<xsl:stylesheet version="1.0"	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                                xmlns:str="http://exslt.org/strings"
                                extension-element-prefixes="str">

<xsl:import href="ppp/str.xsl" />

<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:include href="preferences.xsl"/>
<xsl:include href="skin-options.xsl"/>
<xsl:include href="templates.xsl" />

<xsl:template match="/">

<!-- Added by 5150 skin -->
<!-- This section is required to account for user selected homePages (mjb.homePage). -->
<!-- Sets $currentHomePage to either default of 'Other_All_1' or user defined value represented by mjb.homePage -->
<!--<xsl:variable name="currentHomePage" select="if (string-length($mjb.homePage) = 0) then 'Other_All_1' else $mjb.homePage" />-->
<xsl:variable name="currentHomePage">
   <xsl:choose>
    <xsl:when test="string-length($mjb.homePage) = '0'">Other_All_1</xsl:when>
    <xsl:otherwise><xsl:value-of select="$mjb.homePage"/></xsl:otherwise>
   </xsl:choose>
</xsl:variable>
<!-- Builds $currentIndexPage representation for use in validation later. -->
<xsl:variable name="currentCategory" select="//category[@current='true']/@name"/>
<xsl:variable name="currentName" select="//category[@current='true']/index[@current='true']/@name"/>
<xsl:variable name="currentIndex" select="//category[@current='true']/index[@current='true']/@currentIndex"/>
<xsl:variable name="currentIndexPage" select="concat($currentCategory,'_',$currentName,'_',$currentIndex)"/>
<!-- Added by 5150 skin -->

<!--<xsl:variable name="currentIndex" select="//index[@current='true']/@currentIndex"/>-->
<xsl:variable name="lastIndex" select="//index[@current='true']/@lastIndex"/>
<xsl:variable name="nbCols" select="//@cols"/>
<xsl:variable name="nbLines" select="ceiling(count(library/movies/movie) div $nbCols)"/>

<html>
<xsl:value-of select="'&lt;'" disable-output-escaping="yes"/>!-- <xsl:value-of select="$aeonversion"/> --<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>
<head>
<!--<link rel="StyleSheet" type="text/css" href="exportindex_item_pch.css"></link>-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Moviejukebox</title>


<xsl:choose><xsl:when test="$tv-banners='true' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='true' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
	
	<STYLE type="type/css">
	#bannerlg1 { visibility: hidden; position: absolute; top: 72px; left: 11px; }
	#bannerfr1 { visibility: hidden; position: absolute; top: 61px; left: 0px; }
	#bannertt1 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg2 { visibility: hidden; position: absolute; top: 72px; left: 529px; }
	#bannerfr2 { visibility: hidden; position: absolute; top: 61px; left: 518px; }
	#bannertt2 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg3 { visibility: hidden; position: absolute; top: 203px; left: 11px; }
	#bannerfr3 { visibility: hidden; position: absolute; top: 192px; left: 0px; }
	#bannertt3 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg4 { visibility: hidden; position: absolute; top: 203px; left: 529px; }
	#bannerfr4 { visibility: hidden; position: absolute; top: 192px; left: 518px; }
	#bannertt4 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg5 { visibility: hidden; position: absolute; top: 334px; left: 11px; }
	#bannerfr5 { visibility: hidden; position: absolute; top: 323px; left: 0px; }
	#bannertt5 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg6 { visibility: hidden; position: absolute; top: 334px; left: 529px; }
	#bannerfr6 { visibility: hidden; position: absolute; top: 323px; left: 518px; }
	#bannertt6 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }

	#bannerlg7 { visibility: hidden; position: absolute; top: 465px; left: 11px; }
	#bannerfr7 { visibility: hidden; position: absolute; top: 454px; left: 0px; }
	#bannertt7 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg8 { visibility: hidden; position: absolute; top: 465px; left: 529px; }
	#bannerfr8 { visibility: hidden; position: absolute; top: 454px; left: 518px; }
	#bannertt8 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	td#title { font-size: 18pt; color: #868686; }
td#page { font-size: 18pt; color: #868686; }
td#year { font-size: 18pt; color: #868686; }
div.title{ visibility:hidden; }
div.counter {font-size: 15pt; color: #AAAAAA; }

body { font-size: 10pt; color: #AAAAAA; text-decoration: none; }
a { font-size: 18pt; color: #AAAAAA; text-decoration: none; }
img { border: 0; }
table.main { width:1090; height:83; }
table.categories { width:180; }
td { text-decoration: none;}
td.movies { padding-right: 10px;}

.sortout {
  font-size: 12pt;
  font-weight : normal;
  color: #4e4e4e;
}

.sortin {
  font-size: 17pt;
  font-weight : normal;
  color: #6e6e6e;
}

.mainsorting {
  font-size: 23pt;
  font-weight : normal;
  color: #8e8e8e;
}
	</STYLE>

</xsl:when>

<xsl:when test="$tv-banners='12' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='12' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
	
	<STYLE type="type/css">
	#bannerlg1 { visibility: hidden; position: absolute; top: 48px; left: 11px; }
	#bannerfr1 { visibility: hidden; position: absolute; top: 37px; left: 0px; }
	#bannertt1 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg2 { visibility: hidden; position: absolute; top: 48px; left: 496px; }
	#bannerfr2 { visibility: hidden; position: absolute; top: 37px; left: 485px; }
	#bannertt2 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg3 { visibility: hidden; position: absolute; top: 139px; left: 11px; }
	#bannerfr3 { visibility: hidden; position: absolute; top: 128px; left: 0px; }
	#bannertt3 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg4 { visibility: hidden; position: absolute; top: 139px; left: 496px; }
	#bannerfr4 { visibility: hidden; position: absolute; top: 128px; left: 485px; }
	#bannertt4 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg5 { visibility: hidden; position: absolute; top: 230px; left: 11px; }
	#bannerfr5 { visibility: hidden; position: absolute; top: 219px; left: 0px; }
	#bannertt5 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg6 { visibility: hidden; position: absolute; top: 230px; left: 496px; }
	#bannerfr6 { visibility: hidden; position: absolute; top: 219px; left: 485px; }
	#bannertt6 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }

	#bannerlg7 { visibility: hidden; position: absolute; top: 321px; left: 11px; }
	#bannerfr7 { visibility: hidden; position: absolute; top: 310px; left: 0px; }
	#bannertt7 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg8 { visibility: hidden; position: absolute; top: 321px; left: 496px; }
	#bannerfr8 { visibility: hidden; position: absolute; top: 310px; left: 485px; }
	#bannertt8 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg9 { visibility: hidden; position: absolute; top: 412px; left: 11px; }
	#bannerfr9 { visibility: hidden; position: absolute; top: 401px; left: 0px; }
	#bannertt9 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg10 { visibility: hidden; position: absolute; top: 412px; left: 496px; }
	#bannerfr10 { visibility: hidden; position: absolute; top: 401px; left: 485px; }
	#bannertt10 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg11 { visibility: hidden; position: absolute; top: 503px; left: 11px; }
	#bannerfr11 { visibility: hidden; position: absolute; top: 492px; left: 0px; }
	#bannertt11 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg12 { visibility: hidden; position: absolute; top: 503px; left: 496px; }
	#bannerfr12 { visibility: hidden; position: absolute; top: 492px; left: 485px; }
	#bannertt12 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	td#title { font-size: 18pt; color: #868686; }
td#page { font-size: 18pt; color: #868686; }
td#year { font-size: 18pt; color: #868686; }
div.title{ visibility:hidden; }
div.counter {font-size: 15pt; color: #AAAAAA; }

body { font-size: 10pt; color: #AAAAAA; text-decoration: none; }
a { font-size: 18pt; color: #AAAAAA; text-decoration: none; }
img { border: 0; }
table.main { width:1090; height:83; }
table.categories { width:180; }
td { text-decoration: none;}
td.movies { padding-right: 10px;}

.sortout {
  font-size: 12pt;
  font-weight : normal;
  color: #4e4e4e;
}

.sortin {
  font-size: 17pt;
  font-weight : normal;
  color: #6e6e6e;
}

.mainsorting {
  font-size: 23pt;
  font-weight : normal;
  color: #8e8e8e;
}
	</STYLE>

</xsl:when>

<xsl:when test="$tv-banners='14' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='14' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
	<STYLE type="type/css">
	#bannerlg1 { visibility: hidden; position: absolute; top: 34px; left: 11px; }
	#bannerfr1 { visibility: hidden; position: absolute; top: 23px; left: 0px; }
	#bannertt1 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg2 { visibility: hidden; position: absolute; top: 34px; left: 425px; }
	#bannerfr2 { visibility: hidden; position: absolute; top: 23px; left: 414px; }
	#bannertt2 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg3 { visibility: hidden; position: absolute; top: 112px; left: 11px; }
	#bannerfr3 { visibility: hidden; position: absolute; top: 101px; left: 0px; }
	#bannertt3 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg4 { visibility: hidden; position: absolute; top: 112px; left: 425px; }
	#bannerfr4 { visibility: hidden; position: absolute; top: 101px; left: 414px; }
	#bannertt4 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg5 { visibility: hidden; position: absolute; top: 190px; left: 11px; }
	#bannerfr5 { visibility: hidden; position: absolute; top: 179px; left: 0px; }
	#bannertt5 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg6 { visibility: hidden; position: absolute; top: 190px; left: 425px; }
	#bannerfr6 { visibility: hidden; position: absolute; top: 179px; left: 414px; }
	#bannertt6 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }

	#bannerlg7 { visibility: hidden; position: absolute; top: 268px; left: 11px; }
	#bannerfr7 { visibility: hidden; position: absolute; top: 257px; left: 0px; }
	#bannertt7 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg8 { visibility: hidden; position: absolute; top: 268px; left: 425px; }
	#bannerfr8 { visibility: hidden; position: absolute; top: 257px; left: 414px; }
	#bannertt8 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg9 { visibility: hidden; position: absolute; top: 346px; left: 11px; }
	#bannerfr9 { visibility: hidden; position: absolute; top: 335px; left: 0px; }
	#bannertt9 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg10 { visibility: hidden; position: absolute; top: 346px; left: 425px; }
	#bannerfr10 { visibility: hidden; position: absolute; top: 335px; left: 414px; }
	#bannertt10 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg11 { visibility: hidden; position: absolute; top: 424px; left: 11px; }
	#bannerfr11 { visibility: hidden; position: absolute; top: 413px; left: 0px; }
	#bannertt11 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg12 { visibility: hidden; position: absolute; top: 424px; left: 425px; }
	#bannerfr12 { visibility: hidden; position: absolute; top: 413px; left: 414px; }
	#bannertt12 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	#bannerlg13 { visibility: hidden; position: absolute; top: 502px; left: 11px; }
	#bannerfr13 { visibility: hidden; position: absolute; top: 491px; left: 0px; }
	#bannertt13 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#bannerlg14 { visibility: hidden; position: absolute; top: 502px; left: 425px; }
	#bannerfr14 { visibility: hidden; position: absolute; top: 491px; left: 414px; }
	#bannertt14 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
	td#title { font-size: 18pt; color: #868686; }
td#page { font-size: 18pt; color: #868686; }
td#year { font-size: 18pt; color: #868686; }
div.title{ visibility:hidden; }
div.counter {font-size: 15pt; color: #AAAAAA; }

body { font-size: 10pt; color: #AAAAAA; text-decoration: none; }
a { font-size: 18pt; color: #AAAAAA; text-decoration: none; }
img { border: 0; }
table.main { width:1090; height:83; }
table.categories { width:180; }
td { text-decoration: none;}
td.movies { padding-right: 10px;}

.sortout {
  font-size: 12pt;
  font-weight : normal;
  color: #4e4e4e;
}

.sortin {
  font-size: 17pt;
  font-weight : normal;
  color: #6e6e6e;
}

.mainsorting {
  font-size: 23pt;
  font-weight : normal;
  color: #8e8e8e;
}
	</STYLE>

</xsl:when>

<xsl:otherwise>
<STYLE type="text/css">

<xsl:choose><xsl:when test="$roundedcorners='list'">
#imglistDVD1 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD1 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD1 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD2 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD2 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD2 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD3 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD3 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD3 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD4 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD4 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD4 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD5 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD5 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD5 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD6 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD6 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD6 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD7 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD7 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD7 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD8 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD8 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD8 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD9 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD9 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD9 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD10 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD10 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD10 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD11 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD11 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD11 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD12 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD12 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD12 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD13 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD13 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD13 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD14 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD14 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD14 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD15 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD15 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD15 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD16 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD16 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD16 { visibility: hidden; position: absolute; top: 613px; left: 960px; }
#imglistDVD17 { visibility: hidden; position: absolute; top: 52px; left: 730px; }
#vidlistDVD17 { visibility: hidden; position: absolute; top: 613px; left: 775px; }
#stulistDVD17 { visibility: hidden; position: absolute; top: 613px; left: 960px; }

</xsl:when><xsl:when test="$roundedcorners='awesome'">
		
	#imgDVD1 { visibility: hidden; position: absolute; top: 12px; left: 11px; }
	#frmDVD1 { visibility: hidden; position: absolute; top: 1px; left: 0px; }
	#title1 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD2 { visibility: hidden; position: absolute; top: 12px; left: 103px; }
	#frmDVD2 { visibility: hidden; position: absolute; top: 1px; left: 93px; }
	#title2 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD3 { visibility: hidden; position: absolute; top: 12px; left: 224px; }
	#frmDVD3 { visibility: hidden; position: absolute; top: 1px; left: 214px; }
	#title3 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD4 { visibility: hidden; position: absolute; top: 12px; left: 345px; }
	#frmDVD4 { visibility: hidden; position: absolute; top: 1px; left: 335px; }
	#title4 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD5 { visibility: hidden; position: absolute; top: 12px; left: 466px; }
	#frmDVD5 { visibility: hidden; position: absolute; top: 1px; left: 456px; }
	#title5 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD6 { visibility: hidden; position: absolute; top: 12px; left: 587px; }
	#frmDVD6 { visibility: hidden; position: absolute; top: 1px; left: 577px; }
	#title6 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD7 { visibility: hidden; position: absolute; top: 12px; left: 708px; }
	#frmDVD7 { visibility: hidden; position: absolute; top: 1px; left: 698px; }
	#title7 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD8 { visibility: hidden; position: absolute; top: 12px; left: 829px; }
	#frmDVD8 { visibility: hidden; position: absolute; top: 1px; left: 819px; }
	#title8 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD9 { visibility: hidden; position: absolute; top: 12px; left: 924px; }
	#frmDVD9 { visibility: hidden; position: absolute; top: 1px; left: 914px; }
	#title9 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD10 { visibility: hidden; position: absolute; top: 190px; left: 11px; }
	#frmDVD10 { visibility: hidden; position: absolute; top: 179px; left: 0px; }
	#title10 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD11 { visibility: hidden; position: absolute; top: 190px; left: 103px; }
	#frmDVD11 { visibility: hidden; position: absolute; top: 179px; left: 93px; }
	#title11 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD12 { visibility: hidden; position: absolute; top: 190px; left: 224px; }
	#frmDVD12 { visibility: hidden; position: absolute; top: 179px; left: 214px; }
	#title12 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD13 { visibility: hidden; position: absolute; top: 190px; left: 345px; }
	#frmDVD13 { visibility: hidden; position: absolute; top: 179px; left: 335px; }
	#title13 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD14 { visibility: hidden; position: absolute; top: 190px; left: 466px; }
	#frmDVD14 { visibility: hidden; position: absolute; top: 179px; left: 456px; }
	#title14 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD15 { visibility: hidden; position: absolute; top: 190px; left: 587px; }
	#frmDVD15 { visibility: hidden; position: absolute; top: 179px; left: 577px; }
	#title15 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD16 { visibility: hidden; position: absolute; top: 190px; left: 708px; }
	#frmDVD16 { visibility: hidden; position: absolute; top: 179px; left: 698px; }
	#title16 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD17 { visibility: hidden; position: absolute; top: 190px; left: 829px; }
	#frmDVD17 { visibility: hidden; position: absolute; top: 179px; left: 819px; }
	#title17 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD18 { visibility: hidden; position: absolute; top: 190px; left: 924px; }
	#frmDVD18 { visibility: hidden; position: absolute; top: 179px; left: 914px; }
	#title18 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD19 { visibility: hidden; position: absolute; top: 364px; left: 11px; }
	#frmDVD19 { visibility: hidden; position: absolute; top: 353px; left: 0px; }
	#title19 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD20 { visibility: hidden; position: absolute; top: 364px; left: 103px; }
	#frmDVD20 { visibility: hidden; position: absolute; top: 353px; left: 93px; }
	#title20 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD21 { visibility: hidden; position: absolute; top: 364px; left: 224px; }
	#frmDVD21 { visibility: hidden; position: absolute; top: 353px; left: 214px; }
	#title21 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD22 { visibility: hidden; position: absolute; top: 364px; left: 345px; }
	#frmDVD22 { visibility: hidden; position: absolute; top: 353px; left: 335px; }
	#title22 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD23 { visibility: hidden; position: absolute; top: 364px; left: 466px; }
	#frmDVD23 { visibility: hidden; position: absolute; top: 353px; left: 456px; }
	#title23 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD24 { visibility: hidden; position: absolute; top: 364px; left: 587px; }
	#frmDVD24 { visibility: hidden; position: absolute; top: 353px; left: 577px; }
	#title24 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD25 { visibility: hidden; position: absolute; top: 364px; left: 708px; }
	#frmDVD25 { visibility: hidden; position: absolute; top: 353px; left: 698px; }
	#title25 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD26 { visibility: hidden; position: absolute; top: 364px; left: 829px; }
	#frmDVD26 { visibility: hidden; position: absolute; top: 353px; left: 819px; }
	#title26 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD27 { visibility: hidden; position: absolute; top: 364px; left: 924px; }
	#frmDVD27 { visibility: hidden; position: absolute; top: 353px; left: 914px; }
	#title27 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
</xsl:when>

<xsl:when test="$roundedcorners='awesome2'">
		
	#imgDVD21 { visibility: hidden; position: absolute; top: 12px; left: 12px; }
	#frmDVD21 { visibility: hidden; position: absolute; top: 1px; left: 0px; }
	#title1 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD22 { visibility: hidden; position: absolute; top: 12px; left: 166px; }
	#frmDVD22 { visibility: hidden; position: absolute; top: 1px; left: 155px; }
	#title2 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD23 { visibility: hidden; position: absolute; top: 12px; left: 346px; }
	#frmDVD23 { visibility: hidden; position: absolute; top: 1px; left: 335px; }
	#title3 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD24 { visibility: hidden; position: absolute; top: 12px; left: 526px; }
	#frmDVD24 { visibility: hidden; position: absolute; top: 1px; left: 515px; }
	#title4 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD25 { visibility: hidden; position: absolute; top: 12px; left: 706px; }
	#frmDVD25 { visibility: hidden; position: absolute; top: 1px; left: 695px; }
	#title5 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD26 { visibility: hidden; position: absolute; top: 12px; left: 860px; }
	#frmDVD26 { visibility: hidden; position: absolute; top: 1px; left: 849px; }
	#title6 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD27 { visibility: hidden; position: absolute; top: 277px; left: 12px; }
	#frmDVD27 { visibility: hidden; position: absolute; top: 266px; left: 0px; }
	#title7 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD28 { visibility: hidden; position: absolute; top: 277px; left: 166px; }
	#frmDVD28 { visibility: hidden; position: absolute; top: 266px; left: 155px; }
	#title8 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD29 { visibility: hidden; position: absolute; top: 277px; left: 346px; }
	#frmDVD29 { visibility: hidden; position: absolute; top: 266px; left: 335px; }
	#title9 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD210 { visibility: hidden; position: absolute; top: 277px; left: 526px; }
	#frmDVD210 { visibility: hidden; position: absolute; top: 266px; left: 515px; }
	#title10 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD211 { visibility: hidden; position: absolute; top: 277px; left: 706px; }
	#frmDVD211 { visibility: hidden; position: absolute; top: 266px; left: 695px; }
	#title11 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	#imgDVD212 { visibility: hidden; position: absolute; top: 277px; left: 860px; }
	#frmDVD212 { visibility: hidden; position: absolute; top: 266px; left: 849px; }
	#title12 { visibility: hidden; position: absolute; top: 600px; left: 1px; font-size: 18pt; color: #868686; }
	
</xsl:when>

</xsl:choose>
	
	td#title { font-size: 18pt; color: #868686; }
	#frmlistDVD { visibility: visible; position: absolute; top: 52px; left: 730px; }
td#page { font-size: 18pt; color: #868686; }
td#year { font-size: 18pt; color: #868686; }
div.title{ visibility:hidden; }
div.counter {font-size: 15pt; color: #AAAAAA; }

body { font-size: 10pt; color: #AAAAAA; text-decoration: none; }
a { font-size: 18pt; color: #AAAAAA; text-decoration: none; }
img { border: 0; }
table.main { width:1090; height:83; }
table.categories { width:180; }
td { text-decoration: none;}
td.movies { padding-right: 10px;}

.sortout {
  font-size: 12pt;
  font-weight : normal;
  color: #4e4e4e;
}

.sortin {
  font-size: 17pt;
  font-weight : normal;
  color: #6e6e6e;
}

.mainsorting {
  font-size: 23pt;
  font-weight : normal;
  color: #8e8e8e;
}
	</STYLE>

</xsl:otherwise></xsl:choose>
	
<!--*******************************************************************************************************************************************-->
<script>
var alphaim=[ 
  ",",
  ",",
  <xsl:for-each select="library/category[@name='Title']/index">
    "<xsl:value-of select="@name" />,<xsl:value-of select="." />.html",
  </xsl:for-each>
  ",",
  ","
];

var genreim=[
  ",",
  ",",
  <xsl:for-each select="library/category[@name='Other']/index">
    "<xsl:value-of select="@name" />,<xsl:value-of select="." />.html",
  </xsl:for-each>
  <xsl:for-each select="library/category[@name='Genres']/index">
    "<xsl:value-of select="@name" />,<xsl:value-of select="." />.html",
  </xsl:for-each>
  ",",
  ","
];


var alphaid = 2;
var genrecnt = 2;
var flag = 1;

<xsl:choose>
  <xsl:when test="//index[@current='true']/@name = '09'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'A'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'B'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'C'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'D'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'E'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'F'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'G'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'H'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'I'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'J'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'K'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'L'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'M'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'N'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'O'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'P'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Q'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'R'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'S'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'T'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'U'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'V'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'W'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'X'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Y'">flag = 0</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Z'">flag = 0</xsl:when>

<!-- testing for these genres is not necessary since they fall under 'otherwise' section -->
  <xsl:when test="//index[@current='true']/@name = 'All'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'HD'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'TV Shows'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Movies'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name =' Trailers'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'New'">flag = 1</xsl:when>

  <xsl:when test="//index[@current='true']/@name = 'Action'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Comedy'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Animation'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Documentary'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Drama'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Fantasy'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Other'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Sci-Fi'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Thriller'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Reality-TV'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Horror'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Music'">flag = 1</xsl:when>
  <xsl:when test="//index[@current='true']/@name = 'Top250'">flag = 1</xsl:when>

  <xsl:otherwise>flag = 1</xsl:otherwise>
</xsl:choose>

var xon = index<xsl:value-of select="translate(//index[@current='true']/@name,'-&#x20;','_')" />
var yon = 0
var pagenum = 1

var xon = [
  "",
  <xsl:for-each select="library/movies/movie[@isTrailer != 'true']">
    <xsl:choose>
      <xsl:when test="count(files/file) > 1">
        "<xsl:value-of select='baseFilename' />,<xsl:value-of select="baseFilename" />.playlist.jsp",
      </xsl:when>
      <xsl:otherwise>
        "<xsl:value-of select='baseFilename' />,<xsl:value-of select="files/file[1]/fileURL" />",
      </xsl:otherwise>
    </xsl:choose>
  </xsl:for-each>
  ""
];

//
function moviechange(y)
{
  var j = 0
  yon = yon+y

  document.getElementById('movies1').attributes[0].nodeValue = xon[yon][1];
  document.getElementById('movies2').attributes[0].nodeValue = xon[yon+1][1];
  document.getElementById('movies3').attributes[0].nodeValue = xon[yon+2][1];
  document.getElementById('movies4').attributes[0].nodeValue = xon[yon+3][1];
  document.getElementById('movies5').attributes[0].nodeValue = xon[yon+4][1];
  document.getElementById('movies6').attributes[0].nodeValue = xon[yon+5][1];
  document.getElementById('movies7').attributes[0].nodeValue = xon[yon+6][1];
  document.getElementById('movies8').attributes[0].nodeValue = xon[yon+7][1];
  document.getElementById('movies9').attributes[0].nodeValue = xon[yon+8][1];
  document.getElementById('movies10').attributes[0].nodeValue = xon[yon+9][1];
  document.getElementById('movies11').attributes[0].nodeValue = xon[yon+10][1];
  document.getElementById('movies12').attributes[0].nodeValue = xon[yon+11][1];
  document.getElementById('movies13').attributes[0].nodeValue = xon[yon+12][1];
  document.getElementById('movies14').attributes[0].nodeValue = xon[yon+13][1];

  document.getElementById('image1').attributes[0].nodeValue = xon[yon][2];
  document.getElementById('image2').attributes[0].nodeValue = xon[yon+1][2];
  document.getElementById('image3').attributes[0].nodeValue = xon[yon+2][2];
  document.getElementById('image4').attributes[0].nodeValue = xon[yon+3][2];
  document.getElementById('image5').attributes[0].nodeValue = xon[yon+4][2];
  document.getElementById('image6').attributes[0].nodeValue = xon[yon+5][2];
  document.getElementById('image7').attributes[0].nodeValue = xon[yon+6][2];
  document.getElementById('image8').attributes[0].nodeValue = xon[yon+7][2];
  document.getElementById('image9').attributes[0].nodeValue = xon[yon+8][2];
  document.getElementById('image10').attributes[0].nodeValue = xon[yon+9][2];
  document.getElementById('image11').attributes[0].nodeValue = xon[yon+10][2];
  document.getElementById('image12').attributes[0].nodeValue = xon[yon+11][2];
  document.getElementById('image13').attributes[0].nodeValue = xon[yon+12][2];
  document.getElementById('image14').attributes[0].nodeValue = xon[yon+13][2];

  document.getElementById('playid1').attributes[0].nodeValue = xon[yon][4];
  document.getElementById('playid2').attributes[0].nodeValue = xon[yon+1][4];
  document.getElementById('playid3').attributes[0].nodeValue = xon[yon+2][4];
  document.getElementById('playid4').attributes[0].nodeValue = xon[yon+3][4];
  document.getElementById('playid5').attributes[0].nodeValue = xon[yon+4][4];
  document.getElementById('playid6').attributes[0].nodeValue = xon[yon+5][4];
  document.getElementById('playid7').attributes[0].nodeValue = xon[yon+6][4];
  document.getElementById('playid8').attributes[0].nodeValue = xon[yon+7][4];
  document.getElementById('playid9').attributes[0].nodeValue = xon[yon+8][4];
  document.getElementById('playid10').attributes[0].nodeValue = xon[yon+9][4];
  document.getElementById('playid11').attributes[0].nodeValue = xon[yon+10][4];
  document.getElementById('playid12').attributes[0].nodeValue = xon[yon+11][4];
  document.getElementById('playid13').attributes[0].nodeValue = xon[yon+12][4];
  document.getElementById('playid14').attributes[0].nodeValue = xon[yon+13][4];

  pagenum = pagenum+x
  document.getElementById('title99').firstChild.nodeValue = pagenum +"/<xsl:value-of select="$lastIndex" />";
}

// moves the letters left and right 
function alphaud(x)
{
  var len = alphaim.length
  var last = len - 2
  var twoItems, prevItems, twoprevItems, nextItems, twonextItems

  if (alphaid+x == last) { alphaid = 2 }
  else if (alphaid+x == 1) { alphaid = last - 1 }
  else { alphaid = alphaid+x }

  twoItems = alphaim[alphaid].split(",")
  prevItems = alphaim[alphaid-1].split(",")
  twoprevItems = alphaim[alphaid-2].split(",")
  nextItems = alphaim[alphaid+1].split(",")
  twonextItems = alphaim[alphaid+2].split(",")

  document.getElementById('twoup').firstChild.nodeValue = twoprevItems[0];
  document.getElementById('twoup').attributes[0].nodeValue = twoprevItems[1];

  document.getElementById('previ').firstChild.nodeValue = prevItems[0];
  document.getElementById('previ').attributes[0].nodeValue = prevItems[1];

  document.getElementById('change').firstChild.nodeValue = twoItems[0];
  document.getElementById('change').attributes[0].nodeValue = twoItems[1];

  document.getElementById('next').firstChild.nodeValue = nextItems[0];
  document.getElementById('next').attributes[0].nodeValue = nextItems[1]; 

  document.getElementById('twodown').firstChild.nodeValue = twonextItems[0];
  document.getElementById('twodown').attributes[0].nodeValue = twonextItems[1];
}

// moves the genres left and right
function genrelist(x)
{
  var glen = genreim.length
  var glast = glen - 2
  var genreItems, prevgenre, nextgenre, twoprevgenre, twonextgenre

  if (genrecnt+x == glast) { genrecnt = 2 }
  else if (genrecnt+x == 1) { genrecnt = glast - 1 }
  else { genrecnt = genrecnt+x }

  genreItems = genreim[genrecnt].split(",")
  prevgenre = genreim[genrecnt-1].split(",")
  nextgenre = genreim[genrecnt+1].split(",")
  twoprevgenre = genreim[genrecnt-2].split(",")
  twonextgenre = genreim[genrecnt+2].split(",")

  document.getElementById('twoup').firstChild.nodeValue = twoprevgenre[0];
  document.getElementById('twoup').attributes[0].nodeValue = twoprevgenre[1];

  document.getElementById('previ').firstChild.nodeValue = prevgenre[0];
  document.getElementById('previ').attributes[0].nodeValue = prevgenre[1];

  document.getElementById('change').firstChild.nodeValue = genreItems[0];
  document.getElementById('change').attributes[0].nodeValue = genreItems[1];

  document.getElementById('next').firstChild.nodeValue = nextgenre[0];
  document.getElementById('next').attributes[0].nodeValue = nextgenre[1]; 

  document.getElementById('twodown').firstChild.nodeValue = twonextgenre[0];
  document.getElementById('twodown').attributes[0].nodeValue = twonextgenre[1];
}

// change the list to letters 
function loadletter()
{
  var twoItems, prevItems, twoprevItems, nextItems, twonextItems

  flag = 0
  alphaid = 2
  twoItems = alphaim[alphaid].split(",")
  prevItems = alphaim[alphaid-1].split(",")
  twoprevItems = alphaim[alphaid-2].split(",")
  nextItems = alphaim[alphaid+1].split(",")
  twonextItems = alphaim[alphaid+2].split(",")

  document.getElementById('twoup').firstChild.nodeValue = twoprevItems[0];
  document.getElementById('twoup').attributes[0].nodeValue = twoprevItems[1];

  document.getElementById('previ').firstChild.nodeValue = prevItems[0];
  document.getElementById('previ').attributes[0].nodeValue = prevItems[1];

  document.getElementById('change').firstChild.nodeValue = twoItems[0];
  document.getElementById('change').attributes[0].nodeValue = twoItems[1];

  document.getElementById('next').firstChild.nodeValue = nextItems[0];
  document.getElementById('next').attributes[0].nodeValue = nextItems[1]; 

  document.getElementById('twodown').firstChild.nodeValue = twonextItems[0];
  document.getElementById('twodown').attributes[0].nodeValue = twonextItems[1]; 
  return false
}

// change the list to genres 
function loadgenre()
{
  var genreItems, prevgenre, nextgenre, twoprevgenre, twonextgenre

  flag = 1
  genrecnt = 2
  genreItems = genreim[genrecnt].split(",")
  prevgenre = genreim[genrecnt-1].split(",")
  nextgenre = genreim[genrecnt+1].split(",")
  twoprevgenre = genreim[genrecnt-2].split(",")
  twonextgenre = genreim[genrecnt+2].split(",")

  document.getElementById('twoup').firstChild.nodeValue = twoprevgenre[0];
  document.getElementById('twoup').attributes[0].nodeValue = twoprevgenre[1];

  document.getElementById('previ').firstChild.nodeValue = prevgenre[0];
  document.getElementById('previ').attributes[0].nodeValue = prevgenre[1];

  document.getElementById('change').firstChild.nodeValue = genreItems[0];
  document.getElementById('change').attributes[0].nodeValue = genreItems[1];

  document.getElementById('next').firstChild.nodeValue = nextgenre[0];
  document.getElementById('next').attributes[0].nodeValue = nextgenre[1]; 

  document.getElementById('twodown').firstChild.nodeValue = twonextgenre[0];
  document.getElementById('twodown').attributes[0].nodeValue = twonextgenre[1];

  return false
}

//
function upDown(x)
{
  if (flag == 0)
    alphaud(x)
  else
    genrelist(x)
  return false
}

//
function findItem( list, item )
{
  var result = -1;

  for ( var i = 0 ; i != list.length ; i++ )
  {
    if (list[i] == item) { return i; }
  }
  return result;
}

//
function initpage()
{
  var inittest = -1

  if (flag == 0)
  {
    inittest = findItem( alphaim,
      <xsl:choose>
        <xsl:when test="//index[@current='true']/@name = '09'">"09,Title_09_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'A'">"A,Title_A_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'B'">"B,Title_B_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'C'">"C,Title_C_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'D'">"D,Title_D_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'E'">"E,Title_E_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'F'">"F,Title_F_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'G'">"G,Title_G_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'H'">"H,Title_H_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'I'">"I,Title_I_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'J'">"J,Title_J_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'K'">"K,Title_K_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'L'">"L,Title_L_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'M'">"M,Title_M_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'N'">"N,Title_N_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'O'">"O,Title_O_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'P'">"P,Title_P_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Q'">"Q,Title_Q_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'R'">"R,Title_R_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'S'">"S,Title_S_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'T'">"T,Title_T_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'U'">"U,Title_U_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'V'">"V,Title_V_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'W'">"W,Title_W_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'X'">"X,Title_X_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Y'">"Y,Title_Y_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Z'">"Z,Title_Z_1.html"</xsl:when>
        <xsl:otherwise>"09,Title_09_1.html"</xsl:otherwise>
      </xsl:choose>
    )

    alphaid = inittest
    var twoItems = alphaim[alphaid].split(",")
    var prevItems = alphaim[alphaid-1].split(",")
    var twoprevItems = alphaim[alphaid-2].split(",")
    var nextItems = alphaim[alphaid+1].split(",")
    var twonextItems = alphaim[alphaid+2].split(",")

    document.getElementById('twoup').firstChild.nodeValue = twoprevItems[0];
    document.getElementById('twoup').attributes[0].nodeValue = twoprevItems[1];

    document.getElementById('previ').firstChild.nodeValue = prevItems[0];
    document.getElementById('previ').attributes[0].nodeValue = prevItems[1];

    document.getElementById('change').firstChild.nodeValue = twoItems[0];
    document.getElementById('change').attributes[0].nodeValue = twoItems[1];

    document.getElementById('next').firstChild.nodeValue = nextItems[0];
    document.getElementById('next').attributes[0].nodeValue = nextItems[1]; 

    document.getElementById('twodown').firstChild.nodeValue = twonextItems[0];
    document.getElementById('twodown').attributes[0].nodeValue = twonextItems[1]; 
  }
  else
  {
    inittest = findItem( genreim,
      <xsl:choose>
        <xsl:when test="//index[@current='true']/@name = 'All'">"All,Other_All_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'HD'">"HD,Other_HD_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'TV Shows'">"TV Shows,Other_TV Shows_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Movies'">"Movies,Other_Movies_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Trailers'">"Trailers,Other_Trailers_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'New'">"New,Other_New_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Action'">"Action,Genres_Action_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Comedy'">"Comedy,Genres_Comedy_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Animation'">"Animation,Genres_Animation_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Documentary'">"Documentary,Genres_Documentary_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Drama'">"Drama,Genres_Drama_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Fantasy'">"Fantasy,Genres_Fantasy_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Other'">"Other,Genres_Other_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Sci-Fi'">"Sci-Fi,Genres_Sci-Fi_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Thriller'">"Thriller,Genres_Thriller_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Reality-TV'">"Reality-TV,Genres_Reality-TV_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Horror'">"Horror,Genres_Horror_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Family'">"Family,Genres_Family_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Music'">"Music,Genres_Music_1.html"</xsl:when>
        <xsl:when test="//index[@current='true']/@name = 'Top250'">"Top250,Other_Top250_1.html"</xsl:when>
        <xsl:otherwise>"All,Other_All_1.html"</xsl:otherwise>
      </xsl:choose>
    )

    genrecnt = inittest
    var genreItems = genreim[genrecnt].split(",")
    var prevgenre = genreim[genrecnt-1].split(",")
    var nextgenre = genreim[genrecnt+1].split(",")
    var twoprevgenre = genreim[genrecnt-2].split(",")
    var twonextgenre = genreim[genrecnt+2].split(",")

    document.getElementById('twoup').firstChild.nodeValue = twoprevgenre[0];
    document.getElementById('twoup').attributes[0].nodeValue = twoprevgenre[1];

    document.getElementById('previ').firstChild.nodeValue = prevgenre[0];
    document.getElementById('previ').attributes[0].nodeValue = prevgenre[1];

    document.getElementById('change').firstChild.nodeValue = genreItems[0];
    document.getElementById('change').attributes[0].nodeValue = genreItems[1];

    document.getElementById('next').firstChild.nodeValue = nextgenre[0];
    document.getElementById('next').attributes[0].nodeValue = nextgenre[1]; 

    document.getElementById('twodown').firstChild.nodeValue = twonextgenre[0];
    document.getElementById('twodown').attributes[0].nodeValue = twonextgenre[1];
  }

  return false
}

</script>

<xsl:if test="$ParentalControl='true'">
<script>
var ratingsys= new Array();

ratingsys['G']=1;
ratingsys['PG']=10;
ratingsys['PG-13']=13;
ratingsys['R']=18;
ratingsys['NC-17']=17;
ratingsys['Not Rated']=18;

ratingsys['TV-Y']=1;
ratingsys['TV-Y7']=8;
ratingsys['TV-G']=10;
ratingsys['TV-PG']=13;
ratingsys['TV-14']=15;
ratingsys['TV-MA']=16;

ratingsys['U']=1;
ratingsys['PG']=10;
ratingsys['12']=12;
ratingsys['12A']=13;
ratingsys['15']=15;
ratingsys['18']=18;
ratingsys['R18']=99;

ratingsys['X']=99;
ratingsys['XX']=99;
ratingsys['XXX']=99;

var ratingnow=0;
</script>


<script type="text/javascript">

function prompter(y) 
{
ratingnow=ratingsys[y];

<xsl:choose>
<xsl:when test="$NumberOfChildren > 1">

if (ratingnow<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>=<xsl:value-of select="$YoungestChildsAge"/>)
{
	if (ratingnow<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>=<xsl:value-of select="$OldestChildsAge"/>)
		{		
			var reply = prompt("<xsl:value-of select="$EnterPassword"/>", "")

				if (reply=="<xsl:value-of select="$MasterPassword"/>")
					{
						return
					}
				else 
					{
						alert ( "<xsl:value-of select="$IncorrectPassword"/>")
						return false
					}
		}
	<xsl:if test="$NumberOfChildren=3">
	else if (ratingnow<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>=<xsl:value-of select="$MiddleChildsAge"/>)
		{		
			var reply = prompt("<xsl:value-of select="$EnterPassword"/>", "")

				if (reply=="<xsl:value-of select="$OldestChildsPassword"/>" || reply=="<xsl:value-of select="$MasterPassword"/>")
					{
						return
					}
				else 
					{
						alert ( "<xsl:value-of select="$IncorrectPassword"/>")
						return false
					}
		}
	</xsl:if>

	else
		{		
			var reply = prompt("<xsl:value-of select="$EnterPassword"/>", "")

				if (reply=="<xsl:value-of select="$MiddleChildsPassword"/>" || reply=="<xsl:value-of select="$OldestChildsPassword"/>" || reply=="<xsl:value-of select="$MasterPassword"/>")
					{
						return
					}
				else 
					{
						alert ( "<xsl:value-of select="$IncorrectPassword"/>")
						return false
					}
		}
}
</xsl:when>
<xsl:otherwise>
if (ratingnow<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>=<xsl:value-of select="$YoungestChildsAge"/>)
{
	var reply = prompt("<xsl:value-of select="$EnterPassword"/>", "")

				if (reply=="<xsl:value-of select="$MasterPassword"/>")
					{
						return
					}
				else 
					{
						alert ( "<xsl:value-of select="$IncorrectPassword"/>")
						return false
					}
		}

</xsl:otherwise>
</xsl:choose>
else
{
return
}


}
</script>
</xsl:if>

<!--*******************************************************************************************************************************************-->
<xsl:choose>
<xsl:when test="$tv-banners!='false' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set!='false' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
<script type="text/javascript">
//
  var play = 1;
  function bind() {
    if ( play == 1 ) play = document.getElementById('play');
  }
  function show(x, jsp) {
    bind();
    play.setAttribute('href', jsp);
	<xsl:if test="$ParentalControl='true'">
		play.setAttribute('tvid', '<xsl:value-of select="$ParentalPlayFromWall"/>');
	</xsl:if>
	<xsl:if test="$ParentalControl='false'">
		play.setAttribute('tvid', 'PLAY');
	</xsl:if>
	document.styleSheets[0].cssRules[(x - 1) * 3].style.visibility = "visible"
	document.styleSheets[0].cssRules[(x - 1) * 3 + 1].style.visibility = "visible"
	document.styleSheets[0].cssRules[(x - 1) * 3 + 2].style.visibility = "visible"
  }
  function hide(x) {
    bind();
	play.setAttribute('tvid', '#');
	document.styleSheets[0].cssRules[(x - 1) * 3].style.visibility = "hidden"
	document.styleSheets[0].cssRules[(x - 1) * 3 + 1].style.visibility = "hidden"
	document.styleSheets[0].cssRules[(x - 1) * 3 + 2].style.visibility = "hidden"
  }
//
</script>
</xsl:when>
<xsl:otherwise>

<xsl:choose>
	<xsl:when test="$roundedcorners='true' or $roundedcorners='false' or $roundedcorners='box'">
<script type="text/javascript">
//
  var title = 1;
  var play = 1;
  function bind() {
    if ( play == 1 ) play = document.getElementById('play');
    if ( title == 1 ) title = document.getElementById('title').firstChild;
  }
  function show(x, jsp) {
    bind();
    title.nodeValue = document.getElementById('title'+x).firstChild.nodeValue;
    play.setAttribute('href', jsp);
	<xsl:if test="$ParentalControl='true'">
		play.setAttribute('tvid', '<xsl:value-of select="$ParentalPlayFromWall"/>');
	</xsl:if>
	<xsl:if test="$ParentalControl='false'">
		play.setAttribute('tvid', 'PLAY');
	</xsl:if>
  }
  function hide(x) {
    bind();
    title.nodeValue = "&#160;";
	play.setAttribute('tvid', '#');
  }
//
</script>
	</xsl:when>
	<xsl:otherwise>
<script type="text/javascript">
//
  var play = 1;
  function bind() {
    if ( play == 1 ) play = document.getElementById('play');
  }
  function show(x, jsp) {
    bind();
    play.setAttribute('href', jsp);
	<xsl:if test="$ParentalControl='true'">
		play.setAttribute('tvid', '<xsl:value-of select="$ParentalPlayFromWall"/>');
	</xsl:if>
	<xsl:if test="$ParentalControl='false'">
		play.setAttribute('tvid', 'PLAY');
	</xsl:if>
	document.styleSheets[0].cssRules[(x - 1) * 3].style.visibility = "visible"
	document.styleSheets[0].cssRules[(x - 1) * 3 + 1].style.visibility = "visible"
	document.styleSheets[0].cssRules[(x - 1) * 3 + 2].style.visibility = "visible"
  }
  function hide(x) {
    bind();
	play.setAttribute('tvid', '#');
	document.styleSheets[0].cssRules[(x - 1) * 3].style.visibility = "hidden"
	document.styleSheets[0].cssRules[(x - 1) * 3 + 1].style.visibility = "hidden"
	document.styleSheets[0].cssRules[(x - 1) * 3 + 2].style.visibility = "hidden"
  }
//
</script>
	</xsl:otherwise>
</xsl:choose>

</xsl:otherwise>
</xsl:choose>

<!--===========================================================================================================================================-->
</head>
<body bgproperties="fixed" onloadset="1" FOCUSTEXT="#FFFFFF" focuscolor="transparent" onload="initpage()">
<xsl:variable name="FanartOn"><xsl:if test="$fanart.movie.download='true' or $fanart.tv.download='true'">true</xsl:if></xsl:variable>
<xsl:choose>
	<xsl:when test="$SetFanart='true' and contains(//index[@current='true']/@next,'Set_') and $FanartOn='true'">
		<xsl:attribute name="background"><xsl:value-of select="//index[@current='true']/@first"/><xsl:value-of select="$fanart.scanner.fanartToken"/>.jpg</xsl:attribute>
	</xsl:when>
	<xsl:otherwise>
		<xsl:attribute name="background">pictures/wall/background1.jpg</xsl:attribute>
	</xsl:otherwise>
</xsl:choose>

<xsl:for-each select="library/category[@name='Title']/index">
  <xsl:choose>
    <xsl:when test="@name = '09'"><a href="Title_09_1.html" tvid="1" /></xsl:when>
    <xsl:when test="@name = 'A'"><a href="Title_A_1.html" tvid="2" /></xsl:when>
    <xsl:when test="@name = 'B'"><a href="Title_B_1.html" tvid="22" /></xsl:when>
    <xsl:when test="@name = 'C'"><a href="Title_C_1.html" tvid="222" /></xsl:when>
    <xsl:when test="@name = 'D'"><a href="Title_D_1.html" tvid="3" /></xsl:when>
    <xsl:when test="@name = 'E'"><a href="Title_E_1.html" tvid="33" /></xsl:when>
    <xsl:when test="@name = 'F'"><a href="Title_F_1.html" tvid="333" /></xsl:when>
    <xsl:when test="@name = 'G'"><a href="Title_G_1.html" tvid="4" /></xsl:when>
    <xsl:when test="@name = 'H'"><a href="Title_H_1.html" tvid="44" /></xsl:when>
    <xsl:when test="@name = 'I'"><a href="Title_I_1.html" tvid="444" /></xsl:when>
    <xsl:when test="@name = 'J'"><a href="Title_J_1.html" tvid="5" /></xsl:when>
    <xsl:when test="@name = 'K'"><a href="Title_K_1.html" tvid="55" /></xsl:when>
    <xsl:when test="@name = 'L'"><a href="Title_L_1.html" tvid="555" /></xsl:when>
    <xsl:when test="@name = 'M'"><a href="Title_M_1.html" tvid="6" /></xsl:when>
    <xsl:when test="@name = 'N'"><a href="Title_N_1.html" tvid="66" /></xsl:when>
    <xsl:when test="@name = 'O'"><a href="Title_O_1.html" tvid="666" /></xsl:when>
    <xsl:when test="@name = 'P'"><a href="Title_P_1.html" tvid="7" /></xsl:when>
    <xsl:when test="@name = 'Q'"><a href="Title_Q_1.html" tvid="77" /></xsl:when>
    <xsl:when test="@name = 'R'"><a href="Title_R_1.html" tvid="777" /></xsl:when>
    <xsl:when test="@name = 'S'"><a href="Title_S_1.html" tvid="7777" /></xsl:when>
    <xsl:when test="@name = 'T'"><a href="Title_T_1.html" tvid="8" /></xsl:when>
    <xsl:when test="@name = 'U'"><a href="Title_U_1.html" tvid="88" /></xsl:when>
    <xsl:when test="@name = 'V'"><a href="Title_V_1.html" tvid="888" /></xsl:when>
    <xsl:when test="@name = 'W'"><a href="Title_W_1.html" tvid="9" /></xsl:when>
    <xsl:when test="@name = 'X'"><a href="Title_X_1.html" tvid="99" /></xsl:when>
    <xsl:when test="@name = 'Y'"><a href="Title_Y_1.html" tvid="999" /></xsl:when>
    <xsl:when test="@name = 'Z'"><a href="Title_Z_1.html" tvid="9999" /></xsl:when>
    <xsl:otherwise><a href="blank" tvid="blank" /></xsl:otherwise>
  </xsl:choose>
</xsl:for-each>

<xsl:for-each select="library/category[@name='Other']/index">
  <xsl:choose>
    <xsl:when test="@name = 'All'"><a href="Other_All_1.html" tvid="255" /></xsl:when>
    <xsl:when test="@name = 'HD'"><a href="Other_HD_1.html" tvid="43" /></xsl:when>
    <xsl:when test="@name = 'TV Shows'"><a href="Other_TV Shows_1.html" tvid="887" /></xsl:when>
    <xsl:when test="@name = 'Movies'"><a href="Other_Movies_1.html" tvid="668" /></xsl:when>
    <xsl:when test="@name = 'Trailers'"><a href="Other_Trailers_1.html" tvid="872" /></xsl:when>
    <xsl:when test="@name = 'New'"><a href="Other_New_1.html" tvid="639" /></xsl:when>
    <xsl:when test="//index[@current='true']/@name = 'Top250'">
      <a href="Other_Top250_1.html" tvid="807" />
    </xsl:when>
    <xsl:otherwise><a href="blank" tvid="blank" /></xsl:otherwise>
  </xsl:choose>
</xsl:for-each>

<xsl:for-each select="library/category[@name='Genres']/index">
  <xsl:choose>
    <xsl:when test="@name = 'Action'"><a href="Genres_Action_1.html" tvid="228" /></xsl:when>
    <xsl:when test="@name = 'Animation'"><a href="Genres_Animation_1.html" tvid="264" /></xsl:when>
    <xsl:when test="@name = 'Comedy'"><a href="Genres_Comedy_1.html" tvid="266" /></xsl:when>
    <xsl:when test="@name = 'Documentary'"><a href="Genres_Documentary_1.html" tvid="362" /></xsl:when>
    <xsl:when test="@name = 'Drama'"><a href="Genres_Drama_1.html" tvid="372" /></xsl:when>
    <xsl:when test="@name = 'Fantasy'"><a href="Genres_Fantasy_1.html" tvid="326" /></xsl:when>
    <xsl:when test="@name = 'Other'"><a href="Genres_Other_1.html" tvid="684" /></xsl:when>
    <xsl:when test="@name = 'Sci-Fi'"><a href="Genres_Sci-Fi_1.html" tvid="724" /></xsl:when>
    <xsl:when test="@name = 'Thriller'"><a href="Genres_Thriller_1.html" tvid="847" /></xsl:when>
    <xsl:when test="@name = 'Reality'"><a href="Genres_Reality_1.html" tvid="732" /></xsl:when>
    <xsl:when test="@name = 'Horror'"><a href="Genres_Horror_1.html" tvid="467" /></xsl:when>
    <xsl:when test="@name = 'Family'"><a href="Genres_Family_1.html" tvid="3264" /></xsl:when>
    <xsl:when test="@name = 'Music'"><a href="Genres_Music_1.html" tvid="687" /></xsl:when>
    <xsl:otherwise><a href="blank" tvid="blank" /></xsl:otherwise>
  </xsl:choose>
</xsl:for-each>
<!--===========================================================================================================================================-->
<a>
	<xsl:attribute name="href"></xsl:attribute>
	<xsl:attribute name="tvid">#</xsl:attribute>
	<xsl:attribute name="id">play</xsl:attribute> 
	<xsl:attribute name="vod">playlist</xsl:attribute>
</a>

<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr valign="top"><td height="598">

<table class="main" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top"><td>
  <table class="main" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td align="left" valign="top" height="56" width="200">
                       <xsl:choose>
                        <xsl:when test="contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
							<img src="pictures/wall/tv.png"/>
						</xsl:when>
                        <xsl:otherwise>
							<img src="pictures/wall/movie.png"/>
                        </xsl:otherwise>
                       </xsl:choose>
	</td>
<!--|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||-->
	<td align="right">
	      <table border="0" background="pictures/wall/filterbg1.png" cellspacing="0" cellpadding="0">
        <tr>
		
		<xsl:if test="$NavBar='true'">
                       <xsl:choose>
                        <xsl:when test="contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
		  <td align="center" valign="center" width="37">
            <a onkeyupset="pgupload" onkeydownset="1" onkeyrightset="category" name="moviestv">
			<xsl:if test="$FilterBar='true'">
				<xsl:attribute name="onkeyleftset">right</xsl:attribute>
			</xsl:if>
			<xsl:if test="$FilterBar='false'">
				<xsl:attribute name="onkeyleftset">category</xsl:attribute>
			</xsl:if>
				<xsl:attribute name="href"><xsl:value-of select="$MoviesURL"/></xsl:attribute>
			<img src="pictures/wall/moviesoff.png" onfocussrc="pictures/wall/movieson.png"/></a>
          </td>
						</xsl:when>
                        <xsl:otherwise>
		  <td align="center" valign="center" width="37">
            <a href="Other_TV Shows_1.html" onkeyupset="pgupload" onkeydownset="1" onkeyrightset="category" name="moviestv">
			<xsl:if test="$FilterBar='true'">
				<xsl:attribute name="onkeyleftset">right</xsl:attribute>
			</xsl:if>
			<xsl:if test="$FilterBar='false'">
				<xsl:attribute name="onkeyleftset">category</xsl:attribute>
			</xsl:if>
			<img src="pictures/wall/tvoff.png" onfocussrc="pictures/wall/tvon.png"/></a>
          </td>
                        </xsl:otherwise>
                       </xsl:choose>
		  <td align="center" valign="center" width="37">
            <a href="Categories.html" onkeyupset="pgupload" onkeydownset="1" onkeyleftset="moviestv" name="category">
			<xsl:if test="$FilterBar='true'">
				<xsl:attribute name="onkeyrightset">alpha</xsl:attribute>
			</xsl:if>
			<xsl:if test="$FilterBar='false'">
				<xsl:attribute name="onkeyrightset">moviestv</xsl:attribute>
			</xsl:if>
			<img src="pictures/wall/categoryoff.png" onfocussrc="pictures/wall/categoryon.png"/></a>
          </td>
		  </xsl:if>
		  
		  <xsl:if test="$NavBar='true' and $FilterBar='true'">
		  <td width="37" align="center"><img src="pictures/wall/filterseperatortall.png"/></td>
		  </xsl:if>
		  
		  <xsl:if test="$FilterBar='true'">
          <td align="center" valign="center" width="37">
            <a href="#" tvid="{$alpha}" onclick="return loadletter()" onkeyupset="pgupload" onkeydownset="1" onkeyrightset="left" name="alpha">
			<xsl:if test="$NavBar='true'">
				<xsl:attribute name="onkeyleftset">category</xsl:attribute>
			</xsl:if>
			<xsl:if test="$NavBar='false'">
				<xsl:attribute name="onkeyleftset">right</xsl:attribute>
			</xsl:if>
			<img src="pictures/wall/alphaoff.png" onfocussrc="pictures/wall/alphaon.png"/></a>
          </td>
		<td align="center" valign="center" width="37">
            <a href="#" tvid="{$genre}" onclick="return loadgenre()" onkeyupset="pgupload" onkeydownset="1"><img src="pictures/wall/genreoff.png" onfocussrc="pictures/wall/genreon.png"/></a>
          </td>
		  <td width="37" align="center"><img src="pictures/wall/filterseperatortall.png"/></td>
          <td align="center" valign="center" width="19">
            <a href="#" tvid="{$filter-left}" onclick="return upDown(-1)" name="left" onkeyupset="pgupload" onkeydownset="1" onkeyrightset="middle" id="up"><img src="pictures/wall/leftarrowoff1.png" onfocussrc="pictures/wall/leftarrowon.png"/></a>
          </td>
          <td align="center" width="75">
            <a href="." class="sortout" id="twoup" onkeydownset="1">&#160;</a>
          </td>
		  <td width="1"><img src="pictures/wall/filterseperator.png"/></td>
          <td align="center" width="110">
            <a href="." class="sortin" id="previ" onkeydownset="1">&#160;</a>
          </td>
		  <td width="1"><img src="pictures/wall/filterseperator.png"/></td>
          <td align="center" width="140">
            <a href="Other_All_1.html" tvid="{$filter}" class="mainsorting" name="middle" onkeyupset="pgupload" onkeydownset="1" onkeyleftset="left" onkeyrightset="right" id="change">All</a>
          </td>
		  <td width="1"><img src="pictures/wall/filterseperator.png"/></td>
          <td align="center" width="110">
            <a href="Other_HD_1.html" class="sortin" id="next" onkeydownset="1">HD</a>
          </td>
		  <td width="1"><img src="pictures/wall/filterseperator.png"/></td>
          <td align="center" width="75">
            <a href="Other_Movies_1.html" class="sortout" id="twodown" onkeydownset="1">Movies</a>
          </td>
          <td align="center" valign="center" width="19">
            <a href="#" tvid="{$filter-right}" onclick="return upDown(1)" name="right" onkeyupset="pgupload" onkeydownset="1" onkeyleftset="middle" onkeyrightset="left" id="down"><img src="pictures/wall/rightarrowoff1.png" onfocussrc="pictures/wall/rightarrowon.png"/></a>
          </td>
		  </xsl:if>
        </tr>
      </table>
	</td>
<!--|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||-->
  </tr></table>
  </td></tr>
  <tr align="left" valign="top">

    <td>

<xsl:choose><xsl:when test="$tv-banners='true' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='true' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
<table border="0" cellpadding="0" cellspacing="0"><tr><td width="32">&#160;</td><td><!--1191-->
<table border="0" cellpadding="0" cellspacing="0"><tr>

<xsl:for-each select="library/movies/movie[position()>0 and position() &lt; 3]"><td align="center" valign="middle" height="132" width="513">
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()"/></xsl:attribute><!--1-2-->
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position() = 1 and $FilterBar='true'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">left</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='true'">
						<xsl:attribute name="onkeyupset">left</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 1 and $FilterBar='false' and $NavBar='false'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='false' and $NavBar='false'">
						<xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 1 and $FilterBar='false' and $NavBar='true'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='false' and $NavBar='true'">
						<xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
				<img width="461" height="85">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>2 and position() &lt; 5]"><td align="center" valign="middle" height="132" width="513"><!--3-4-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+2"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+2"/></xsl:attribute>
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+2 = 3"><xsl:attribute name="onkeyleftset">2</xsl:attribute></xsl:if>
					<xsl:if test="position()+2 = 4"><xsl:attribute name="onkeyrightset">5</xsl:attribute></xsl:if>
				<img width="461" height="85">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+2"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>4 and position() &lt; 7]"><td align="center" valign="middle" height="132" width="513"><!--5-6-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+4"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+4"/></xsl:attribute>
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+4 = 5"><xsl:attribute name="onkeyleftset">4</xsl:attribute></xsl:if>
					<xsl:if test="position()+4 = 6"><xsl:attribute name="onkeyrightset">7</xsl:attribute></xsl:if>
				<img width="461" height="85">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+4"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>6 and position() &lt; 9]"><td align="center" valign="middle" height="132" width="513"><!--7-8-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+6"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+6"/></xsl:attribute>
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+6 = 7"><xsl:attribute name="onkeyleftset">6</xsl:attribute></xsl:if>
					<xsl:if test="position()+6 = 7"><xsl:attribute name="onkeydownset">pgdnload</xsl:attribute></xsl:if>
					<xsl:if test="position()+6 = 8"><xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute></xsl:if>
					<xsl:if test="position()+6 = 8"><xsl:attribute name="onkeydownset">pgdnload</xsl:attribute></xsl:if>
				<img width="461" height="85">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+6"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

</tr></table></td></tr></table>


</xsl:when>

<xsl:when test="$tv-banners='12' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='12' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
<table border="0" cellpadding="0" cellspacing="0"><tr><td width="60">&#160;</td><td><!--493-->
<table border="0" cellpadding="0" cellspacing="0"><tr>

<xsl:for-each select="library/movies/movie[position()>0 and position() &lt; 3]"><td align="center" valign="middle" height="91" width="484">
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()"/></xsl:attribute><!--1-2-->
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position() = 1 and $FilterBar='true'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">left</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='true'">
						<xsl:attribute name="onkeyupset">left</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 1 and $FilterBar='false' and $NavBar='false'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='false' and $NavBar='false'">
						<xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 1 and $FilterBar='false' and $NavBar='true'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='false' and $NavBar='true'">
						<xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
				<img width="482" height="89">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>2 and position() &lt; 5]"><td align="center" valign="middle" height="91" width="484"><!--3-4-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+2"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+2"/></xsl:attribute>
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+2 = 3"><xsl:attribute name="onkeyleftset">2</xsl:attribute></xsl:if>
					<xsl:if test="position()+2 = 4"><xsl:attribute name="onkeyrightset">5</xsl:attribute></xsl:if>
				<img width="482" height="89">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+2"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>4 and position() &lt; 7]"><td align="center" valign="middle" height="91" width="484"><!--5-6-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+4"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+4"/></xsl:attribute>
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+4 = 5"><xsl:attribute name="onkeyleftset">4</xsl:attribute></xsl:if>
					<xsl:if test="position()+4 = 6"><xsl:attribute name="onkeyrightset">7</xsl:attribute></xsl:if>
				<img width="482" height="89">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+4"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>6 and position() &lt; 9]"><td align="center" valign="middle" height="91" width="484"><!--7-8-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+6"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+6"/></xsl:attribute>
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+6 = 7"><xsl:attribute name="onkeyleftset">6</xsl:attribute></xsl:if>
					<xsl:if test="position()+6 = 8"><xsl:attribute name="onkeyrightset">9</xsl:attribute></xsl:if>
				<img width="482" height="89">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+6"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>8 and position() &lt; 11]"><td align="center" valign="middle" height="91" width="484"><!--9-10-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+8"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+8"/></xsl:attribute>
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+8"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+8"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+8"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+8"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+8 = 9"><xsl:attribute name="onkeyleftset">8</xsl:attribute></xsl:if>
					<xsl:if test="position()+8 = 10"><xsl:attribute name="onkeyrightset">11</xsl:attribute></xsl:if>
				<img width="482" height="89">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+8"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>10 and position() &lt; 13]"><td align="center" valign="middle" height="91" width="484"><!--11-12-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+10"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+10"/></xsl:attribute>
					<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+10"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+10"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+10"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+10"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+10 = 11"><xsl:attribute name="onkeyleftset">10</xsl:attribute></xsl:if>
					<xsl:if test="position()+10 = 11"><xsl:attribute name="onkeydownset">pgdnload</xsl:attribute></xsl:if>
					<xsl:if test="position()+10 = 12"><xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute></xsl:if>
					<xsl:if test="position()+10 = 12"><xsl:attribute name="onkeydownset">pgdnload</xsl:attribute></xsl:if>
				<img width="482" height="89">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+10"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

</tr></table></td></tr></table>


</xsl:when>

<xsl:when test="$tv-banners='14' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='14' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">
<table border="0" cellpadding="0" cellspacing="0"><tr><td width="131">&#160;</td><td><!--493-->
<table border="0" cellpadding="0" cellspacing="0"><tr>

<xsl:for-each select="library/movies/movie[position()>0 and position() &lt; 3]"><td align="center" valign="middle" height="78" width="413">
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()"/></xsl:attribute><!--1-2-->
<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onfocus">show(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onblur">hide(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position() = 1 and $FilterBar='true'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">left</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='true'">
						<xsl:attribute name="onkeyupset">left</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 1 and $FilterBar='false' and $NavBar='false'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='false' and $NavBar='false'">
						<xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 1 and $FilterBar='false' and $NavBar='true'">
						<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
						<xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
					</xsl:if>
					<xsl:if test="position() = 2 and $FilterBar='false' and $NavBar='true'">
						<xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
						<xsl:attribute name="onkeyrightset">3</xsl:attribute>
					</xsl:if>
				<img width="411" height="76">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>2 and position() &lt; 5]"><td align="center" valign="middle" height="78" width="413"><!--3-4-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+2"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+2"/></xsl:attribute>
<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+2"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+2 = 3"><xsl:attribute name="onkeyleftset">2</xsl:attribute></xsl:if>
					<xsl:if test="position()+2 = 4"><xsl:attribute name="onkeyrightset">5</xsl:attribute></xsl:if>
				<img width="411" height="76">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+2"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>4 and position() &lt; 7]"><td align="center" valign="middle" height="78" width="413"><!--5-6-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+4"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+4"/></xsl:attribute>
<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+4"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+4 = 5"><xsl:attribute name="onkeyleftset">4</xsl:attribute></xsl:if>
					<xsl:if test="position()+4 = 6"><xsl:attribute name="onkeyrightset">7</xsl:attribute></xsl:if>
				<img width="411" height="76">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+4"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>6 and position() &lt; 9]"><td align="center" valign="middle" height="78" width="413"><!--7-8-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+6"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+6"/></xsl:attribute>
<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+6"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+6 = 7"><xsl:attribute name="onkeyleftset">6</xsl:attribute></xsl:if>
					<xsl:if test="position()+6 = 8"><xsl:attribute name="onkeyrightset">9</xsl:attribute></xsl:if>
				<img width="411" height="76">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+6"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>8 and position() &lt; 11]"><td align="center" valign="middle" height="78" width="413"><!--9-10-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+8"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+8"/></xsl:attribute>
<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+8"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+8"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+8"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+8"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+8 = 9"><xsl:attribute name="onkeyleftset">8</xsl:attribute></xsl:if>
					<xsl:if test="position()+8 = 10"><xsl:attribute name="onkeyrightset">11</xsl:attribute></xsl:if>
				<img width="411" height="76">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+8"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>10 and position() &lt; 13]"><td align="center" valign="middle" height="78" width="413"><!--11-12-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+10"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+10"/></xsl:attribute>
<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+10"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+10"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+10"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+10"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+10 = 11"><xsl:attribute name="onkeyleftset">10</xsl:attribute></xsl:if>
					<xsl:if test="position()+10 = 12"><xsl:attribute name="onkeyrightset">13</xsl:attribute></xsl:if>
				<img width="411" height="76">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+10"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

<xsl:for-each select="library/movies/movie[position()>12 and position() &lt; 15]"><td align="center" valign="middle" height="78" width="413"><!--13-14-->
				<a>
					<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
					<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
					<xsl:attribute name="TVID"><xsl:value-of select="position()+12"/></xsl:attribute>
					<xsl:attribute name="name"><xsl:value-of select="position()+12"/></xsl:attribute>
<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+12"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+12"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+12"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+12"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
					<xsl:if test="position()+12 = 13"><xsl:attribute name="onkeyleftset">12</xsl:attribute></xsl:if>
					<xsl:if test="position()+12 = 13"><xsl:attribute name="onkeydownset">pgdnload</xsl:attribute></xsl:if>
					<xsl:if test="position()+12 = 14"><xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute></xsl:if>
					<xsl:if test="position()+12 = 14"><xsl:attribute name="onkeydownset">pgdnload</xsl:attribute></xsl:if>
				<img width="411" height="76">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+12"/></xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
				</a>
</td></xsl:for-each>

</tr><tr>

</tr></table></td></tr></table>


</xsl:when>

<xsl:otherwise>
<xsl:choose><xsl:when test="$roundedcorners='list'">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td background="pictures/wall/listpanelback.png" width="692" height="531" valign="top">
		<table class="movies" border="0" cellpadding="0" cellspacing="4">
<xsl:for-each select="library/movies/movie[position()>0 and position() &lt; 18]">
	<tr>
	<td align="left" background="pictures/wall/listbg.png" width="538">
		<a>
			<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
			<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
			<xsl:attribute name="TVID"><xsl:value-of select="position()"/></xsl:attribute>
			<xsl:attribute name="name"><xsl:value-of select="position()"/></xsl:attribute>
				<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
				<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
				<xsl:attribute name="onfocus">show(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
				<xsl:attribute name="onblur">hide(<xsl:value-of select="position()"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>

          <xsl:if test="$lastIndex != 0">

		  <xsl:if test="position()=1 and $currentIndex != 0 and $FilterBar='true'">
              <xsl:attribute name="onkeyupset">left</xsl:attribute>
			  <xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
			  <xsl:attribute name="onkeyrightset">left</xsl:attribute>
            </xsl:if>
            <xsl:if test="position()=1 and $currentIndex != 0 and $FilterBar='false' and $NavBar='false'">
              <xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
				<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
				<xsl:attribute name="onkeyrightset">2</xsl:attribute>
            </xsl:if>
            <xsl:if test="position()=1 and $currentIndex != 0 and $FilterBar='false' and $NavBar='true'">
              <xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
				<xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
				<xsl:attribute name="onkeyrightset">moviestv</xsl:attribute>
            </xsl:if>
			
			<xsl:if test="position() &gt; 1 and position() &lt; 18 and $FilterBar='true'">
				<xsl:attribute name="onkeyleftset">left</xsl:attribute>
				<xsl:attribute name="onkeyrightset">left</xsl:attribute>
			</xsl:if>
			<xsl:if test="position() &gt; 1 and position() &lt; 18 and $FilterBar='false' and $NavBar='false'">
				<xsl:attribute name="onkeyleftset"><xsl:value-of select="position()-1"/></xsl:attribute>
				<xsl:attribute name="onkeyrightset"><xsl:value-of select="position()+1"/></xsl:attribute>
			</xsl:if>
			<xsl:if test="position() &gt; 1 and position() &lt; 18 and $FilterBar='false' and $NavBar='true'">
				<xsl:attribute name="onkeyleftset">moviestv</xsl:attribute>
				<xsl:attribute name="onkeyrightset">moviestv</xsl:attribute>
			</xsl:if>
			
            <xsl:if test="position()=17">
				<xsl:attribute name="onkeydownset">pgdnload</xsl:attribute>
			</xsl:if>

<!--
<xsl:if test="position() = 2"><xsl:attribute name="onkeyrightset">3</xsl:attribute><xsl:attribute name="onkeyleftset">1</xsl:attribute></xsl:if>
<xsl:if test="position() = 3"><xsl:attribute name="onkeyrightset">4</xsl:attribute><xsl:attribute name="onkeyleftset">2</xsl:attribute></xsl:if>
<xsl:if test="position() = 4"><xsl:attribute name="onkeyrightset">5</xsl:attribute><xsl:attribute name="onkeyleftset">3</xsl:attribute></xsl:if>
<xsl:if test="position() = 5"><xsl:attribute name="onkeyrightset">6</xsl:attribute><xsl:attribute name="onkeyleftset">4</xsl:attribute></xsl:if>
<xsl:if test="position() = 6"><xsl:attribute name="onkeyrightset">7</xsl:attribute><xsl:attribute name="onkeyleftset">5</xsl:attribute></xsl:if>
<xsl:if test="position() = 7"><xsl:attribute name="onkeyrightset">8</xsl:attribute><xsl:attribute name="onkeyleftset">6</xsl:attribute></xsl:if>
<xsl:if test="position() = 8"><xsl:attribute name="onkeyrightset">9</xsl:attribute><xsl:attribute name="onkeyleftset">7</xsl:attribute></xsl:if>
<xsl:if test="position() = 9"><xsl:attribute name="onkeyrightset">10</xsl:attribute><xsl:attribute name="onkeyleftset">8</xsl:attribute></xsl:if>
<xsl:if test="position() = 10"><xsl:attribute name="onkeyrightset">11</xsl:attribute><xsl:attribute name="onkeyleftset">9</xsl:attribute></xsl:if>
<xsl:if test="position() = 11"><xsl:attribute name="onkeyrightset">12</xsl:attribute><xsl:attribute name="onkeyleftset">10</xsl:attribute></xsl:if>
<xsl:if test="position() = 12"><xsl:attribute name="onkeyrightset">13</xsl:attribute><xsl:attribute name="onkeyleftset">11</xsl:attribute></xsl:if>
<xsl:if test="position() = 13"><xsl:attribute name="onkeyrightset">14</xsl:attribute><xsl:attribute name="onkeyleftset">12</xsl:attribute></xsl:if>
<xsl:if test="position() = 14"><xsl:attribute name="onkeyrightset">15</xsl:attribute><xsl:attribute name="onkeyleftset">13</xsl:attribute></xsl:if>
<xsl:if test="position() = 15"><xsl:attribute name="onkeyrightset">16</xsl:attribute><xsl:attribute name="onkeyleftset">14</xsl:attribute></xsl:if>
<xsl:if test="position() = 16"><xsl:attribute name="onkeyrightset">17</xsl:attribute><xsl:attribute name="onkeyleftset">15</xsl:attribute></xsl:if>
<xsl:if test="position() = 17"><xsl:attribute name="onkeyleftset">16</xsl:attribute><xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute><xsl:attribute name="onkeydownset">pgdnload</xsl:attribute></xsl:if>
-->
          </xsl:if>

<xsl:choose>
    <xsl:when test="string-length(title)&lt;45">
        <xsl:value-of select="title"/>
    </xsl:when>
    <xsl:otherwise>
        <xsl:value-of select="substring(title,1,42)"/>...
    </xsl:otherwise>
</xsl:choose>
<xsl:choose>
  <xsl:when test="season = 0">:&#160;<xsl:value-of select="$Specials"/></xsl:when>
  <xsl:when test="season &gt; 0">&#160;<xsl:value-of select="$Season"/>&#160;<xsl:value-of select="season"/></xsl:when>
  <xsl:otherwise></xsl:otherwise>
</xsl:choose>
		</a>
	</td>
	
	<td id="title" width="125" background="pictures/wall/listbg-right.png"><!--125-->
<xsl:if test="$ListDetail='year'">
	<xsl:choose>
		<xsl:when test="year &gt;= 1900">&#160;&#160;&#160;&#160;<xsl:value-of select="year"/></xsl:when>
		<xsl:otherwise>&#160;&#160;&#160;&#160;&#160;&#160;--</xsl:otherwise>
	</xsl:choose>
</xsl:if>
	<xsl:if test="$ListDetail='certification'"><xsl:value-of select="certification"/></xsl:if>
	<xsl:if test="$ListDetail='rating'">&#160;&#160;&#160;&#160;&#160;<xsl:value-of select="rating div 10"/></xsl:if>
	</td>

	</tr>
</xsl:for-each>
      </table>
</td></tr></table>
</xsl:when><xsl:otherwise>
		<table class="movies" border="0" cellpadding="0" cellspacing="4">
        <xsl:for-each select="library/movies/movie[position() mod $nbCols = 1]">
          <tr>
            <xsl:apply-templates
                 select=".|following-sibling::movie[position() &lt; $nbCols]">
              <xsl:with-param name="gap" select="(position() - 1) * $nbCols" />
              <xsl:with-param name="currentIndex" select="$currentIndex" />
              <xsl:with-param name="lastIndex" select="$lastIndex" />
              <xsl:with-param name="lastGap" select="($nbLines - 1) * $nbCols" />
            </xsl:apply-templates>
          </tr>
        </xsl:for-each>
      </table>
</xsl:otherwise></xsl:choose>
</xsl:otherwise></xsl:choose>

<br/>
    </td>
  </tr>
</table>

</td></tr></table>


<xsl:choose><xsl:when test="$roundedcorners='true' or $roundedcorners='false' or $roundedcorners='box'">
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
    <tr>
    <td align="left" id="title" valign="top">&#160;</td>
	
	
	
	<td align="right" id="page" valign="top"><xsl:value-of select="$Page"/>&#160;
	
	<xsl:if test="$ForComputer='false'"><xsl:value-of select="$currentIndex"/></xsl:if>
	<xsl:if test="$ForComputer='true'">
		<a>
			<xsl:attribute name="href">
			<xsl:value-of select="library/category[@current='true']/index[@current='true']/@previous" />.html</xsl:attribute>
			<xsl:value-of select="$currentIndex"/>
		</a>
	</xsl:if>
	
	&#160;<xsl:value-of select="$OutOf"/>&#160;<a onfocusload=""><xsl:attribute name="href"><xsl:value-of select="library/category[@current='true']/index[@current='true']/@next" />.html</xsl:attribute><xsl:value-of select="$lastIndex" /></a></td>
	</tr>
	<tr>
	<td>&#160;</td>
	<td align="right" id="year" valign="top">&#160;</td>
	</tr>
</table>
</xsl:when><xsl:when test="$roundedcorners='awesome' or $roundedcorners='awesome2'">
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
    <tr>
	<td align="left" valign="top">&#160;</td>
	<td align="right" id="page" valign="top"><xsl:value-of select="$Page"/>&#160;
	
	<xsl:if test="$ForComputer='false'"><xsl:value-of select="$currentIndex"/></xsl:if>
	<xsl:if test="$ForComputer='true'">
		<a>
			<xsl:attribute name="href">
			<xsl:value-of select="library/category[@current='true']/index[@current='true']/@previous" />.html</xsl:attribute>
			<xsl:value-of select="$currentIndex"/>
		</a>
	</xsl:if>
	
	&#160;<xsl:value-of select="$OutOf"/>&#160;<a onfocusload=""><xsl:attribute name="href"><xsl:value-of select="library/category[@current='true']/index[@current='true']/@next" />.html</xsl:attribute><xsl:value-of select="$lastIndex" /></a></td>
	</tr>
	<tr>
	<td>&#160;</td>
	<td align="right" id="year" valign="top">&#160;</td>
	</tr>
</table>
</xsl:when><xsl:when test="$roundedcorners='list'">
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
    <tr>
	<td align="left" id="page" valign="top"><xsl:value-of select="$Page"/>&#160;
	
	<xsl:if test="$ForComputer='false'"><xsl:value-of select="$currentIndex"/></xsl:if>
	<xsl:if test="$ForComputer='true'">
		<a>
			<xsl:attribute name="href">
			<xsl:value-of select="library/category[@current='true']/index[@current='true']/@previous" />.html</xsl:attribute>
			<xsl:value-of select="$currentIndex"/>
		</a>
	</xsl:if>
	
	&#160;<xsl:value-of select="$OutOf"/>&#160;<a onfocusload=""><xsl:attribute name="href"><xsl:value-of select="library/category[@current='true']/index[@current='true']/@next" />.html</xsl:attribute><xsl:value-of select="$lastIndex" /></a></td>
	<td align="right" valign="top" width="367"><img src="pictures/wall/spotlight.png"/></td>
	</tr>
	<tr>
	<td>&#160;</td>
	<td align="right" id="year" valign="top">&#160;</td>
	</tr>
</table>
</xsl:when></xsl:choose>

<xsl:choose><xsl:when test="$tv-banners='true' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='true' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">

  <xsl:for-each select="library/movies/movie">
	<div>
      <xsl:attribute name="id">bannertt<xsl:value-of select="position()"/></xsl:attribute>
      <xsl:value-of select="title"/>
      <xsl:choose>
        <xsl:when test="season > 0"> Season <xsl:value-of select="season"/></xsl:when>
        <xsl:when test="season = 0"> Specials</xsl:when>
      </xsl:choose>
      <xsl:if test="year != '' and year != 'UNKNOWN'">
        <xsl:if test="season = -1 and $skin-year = 'true'"> - <xsl:value-of select="year" /></xsl:if>
        <xsl:if test="season != -1 and $skin-yearTV = 'true'"> - <xsl:value-of select="year" /></xsl:if>
      </xsl:if>
      <xsl:if test="$skin-certification = 'true' and certification != '' and certification != 'UNKNOWN'"> (<xsl:value-of select="certification" />)</xsl:if>
	  <xsl:if test="$skin-runtime = 'true' and runtime != '' and runtime != 'UNKNOWN'"> (<xsl:value-of select="runtime" />)</xsl:if>
	  <xsl:if test="$skin-rating = 'true' and rating != '' and rating != 'UNKNOWN'"> (<xsl:value-of select="rating div 10" />/10)</xsl:if>
    </div>	
				<img width="{$banners.width}">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">bannerlg<xsl:value-of select="position()"/></xsl:attribute>
			</img>
			<img>
				<xsl:attribute name="src">pictures/wall/hover-frame-banner8.png</xsl:attribute>
				<xsl:attribute name="id">bannerfr<xsl:value-of select="position()"/></xsl:attribute>
			</img>
  </xsl:for-each>

</xsl:when>

<xsl:when test="$tv-banners='12' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='12' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">

  <xsl:for-each select="library/movies/movie">
	<div>
      <xsl:attribute name="id">bannertt<xsl:value-of select="position()"/></xsl:attribute>
      <xsl:value-of select="title"/>
      <xsl:choose>
        <xsl:when test="season > 0"> Season <xsl:value-of select="season"/></xsl:when>
        <xsl:when test="season = 0"> Specials</xsl:when>
      </xsl:choose>
      <xsl:if test="year != '' and year != 'UNKNOWN'">
        <xsl:if test="season = -1 and $skin-year = 'true'"> - <xsl:value-of select="year" /></xsl:if>
        <xsl:if test="season != -1 and $skin-yearTV = 'true'"> - <xsl:value-of select="year" /></xsl:if>
      </xsl:if>
      <xsl:if test="$skin-certification = 'true' and certification != '' and certification != 'UNKNOWN'"> (<xsl:value-of select="certification" />)</xsl:if>
	  <xsl:if test="$skin-runtime = 'true' and runtime != '' and runtime != 'UNKNOWN'"> (<xsl:value-of select="runtime" />)</xsl:if>
	  <xsl:if test="$skin-rating = 'true' and rating != '' and rating != 'UNKNOWN'"> (<xsl:value-of select="rating div 10" />/10)</xsl:if>
    </div>	
			<img width="{$banners.width}">
<!--				<xsl:choose>
					<xsl:when test="$tv-banners-set='true'">
						<xsl:attribute name="width">557</xsl:attribute>
					</xsl:when>
					<xsl:when test="$tv-banners-set='12'">
						<xsl:attribute name="width">587</xsl:attribute>
					</xsl:when>
					<xsl:when test="$tv-banners-set='14'">
						<xsl:attribute name="width">659</xsl:attribute>
					</xsl:when>
				</xsl:choose>-->
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">bannerlg<xsl:value-of select="position()"/></xsl:attribute>
			</img>
			<img>
				<xsl:attribute name="src">pictures/wall/hover-frame-banner12.png</xsl:attribute>
				<xsl:attribute name="id">bannerfr<xsl:value-of select="position()"/></xsl:attribute>
			</img>
  </xsl:for-each>

</xsl:when>

<xsl:when test="$tv-banners='14' and contains(//index[@current='true']/@next,'TV Shows') and not(contains(//index[@current='true']/@next,'Year')) and not(contains(//index[@current='true']/@next,'Title')) and not(contains(//index[@current='true']/@next,'Rating')) and not(contains(//index[@current='true']/@next,'Genres')) or $tv-banners-set='14' and contains(//category[@current='true']/@name,'Set') and library/movies/movie/season != -1">

  <xsl:for-each select="library/movies/movie">
	<div>
      <xsl:attribute name="id">bannertt<xsl:value-of select="position()"/></xsl:attribute>
      <xsl:value-of select="title"/>
      <xsl:choose>
        <xsl:when test="season > 0"> Season <xsl:value-of select="season"/></xsl:when>
        <xsl:when test="season = 0"> Specials</xsl:when>
      </xsl:choose>
      <xsl:if test="year != '' and year != 'UNKNOWN'">
        <xsl:if test="season = -1 and $skin-year = 'true'"> - <xsl:value-of select="year" /></xsl:if>
        <xsl:if test="season != -1 and $skin-yearTV = 'true'"> - <xsl:value-of select="year" /></xsl:if>
      </xsl:if>
      <xsl:if test="$skin-certification = 'true' and certification != '' and certification != 'UNKNOWN'"> (<xsl:value-of select="certification" />)</xsl:if>
	  <xsl:if test="$skin-runtime = 'true' and runtime != '' and runtime != 'UNKNOWN'"> (<xsl:value-of select="runtime" />)</xsl:if>
	  <xsl:if test="$skin-rating = 'true' and rating != '' and rating != 'UNKNOWN'"> (<xsl:value-of select="rating div 10" />/10)</xsl:if>
    </div>	
			<img width="{$banners.width}">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">bannerlg<xsl:value-of select="position()"/></xsl:attribute>
			</img>
			<img>
				<xsl:attribute name="src">pictures/wall/hover-frame-banner14.png</xsl:attribute>
				<xsl:attribute name="id">bannerfr<xsl:value-of select="position()"/></xsl:attribute>
			</img>
  </xsl:for-each>

</xsl:when>

<xsl:otherwise>

    						<xsl:choose>
							<xsl:when test="$roundedcorners='true' or $roundedcorners='false' or $roundedcorners='box'">
  <xsl:for-each select="library/movies/movie">
    <div class="title">
      <xsl:attribute name="id">title<xsl:value-of select="position()"/></xsl:attribute>
      <xsl:value-of select="title"/>
      <xsl:choose>
        <xsl:when test="season > 0"> Season <xsl:value-of select="season"/></xsl:when>
        <xsl:when test="season = 0"> Specials</xsl:when>
      </xsl:choose>
      <xsl:if test="year != '' and year != 'UNKNOWN'">
        <xsl:if test="season = -1 and $skin-year = 'true'"> - <xsl:value-of select="year" /></xsl:if>
        <xsl:if test="season != -1 and $skin-yearTV = 'true'"> - <xsl:value-of select="year" /></xsl:if>
      </xsl:if>
      <xsl:if test="$skin-certification = 'true' and certification != '' and certification != 'UNKNOWN'"> (<xsl:value-of select="certification" />)</xsl:if>
	  <xsl:if test="$skin-runtime = 'true' and runtime != '' and runtime != 'UNKNOWN'"> (<xsl:value-of select="runtime" />)</xsl:if>
	  <xsl:if test="$skin-rating = 'true' and rating != '' and rating != 'UNKNOWN'"> (<xsl:value-of select="rating div 10" />/10)</xsl:if>
    </div>
  </xsl:for-each>
  
  	</xsl:when>
		<xsl:when test="$roundedcorners='awesome' or $roundedcorners='awesome2'">
  
    <xsl:for-each select="library/movies/movie">
	<div>
      <xsl:attribute name="id">title<xsl:value-of select="position()"/></xsl:attribute>
      <xsl:value-of select="title"/>
      <xsl:choose>
        <xsl:when test="season > 0"> Season <xsl:value-of select="season"/></xsl:when>
        <xsl:when test="season = 0"> Specials</xsl:when>
      </xsl:choose>
      <xsl:if test="year != '' and year != 'UNKNOWN'">
        <xsl:if test="season = -1 and $skin-year = 'true'"> - <xsl:value-of select="year" /></xsl:if>
        <xsl:if test="season != -1 and $skin-yearTV = 'true'"> - <xsl:value-of select="year" /></xsl:if>
      </xsl:if>
      <xsl:if test="$skin-certification = 'true' and certification != '' and certification != 'UNKNOWN'"> (<xsl:value-of select="certification" />)</xsl:if>
	  <xsl:if test="$skin-runtime = 'true' and runtime != '' and runtime != 'UNKNOWN'"> (<xsl:value-of select="runtime" />)</xsl:if>
	  <xsl:if test="$skin-rating = 'true' and rating != '' and rating != 'UNKNOWN'"> (<xsl:value-of select="rating div 10" />/10)</xsl:if>
    </div>
  </xsl:for-each>
  </xsl:when>
	</xsl:choose>
  
      						<xsl:choose>
							<xsl:when test="$roundedcorners='true' or $roundedcorners='false' or $roundedcorners='box'">&#160;</xsl:when>
  <xsl:when test="$roundedcorners='awesome'">
  <xsl:for-each select="library/movies/movie">
			<img>
				<xsl:attribute name="src"><xsl:value-of select="thumbnail"/></xsl:attribute>
				<xsl:attribute name="id">imgDVD<xsl:value-of select="position()"/></xsl:attribute>
			</img>
			<img>
				<xsl:attribute name="src">pictures/wall/hover-frame.png</xsl:attribute>
				<xsl:attribute name="id">frmDVD<xsl:value-of select="position()"/></xsl:attribute>
			</img>
</xsl:for-each>
  </xsl:when>
  <xsl:when test="$roundedcorners='awesome2'">
  <xsl:for-each select="library/movies/movie">
			<img>
				<xsl:attribute name="src"><xsl:value-of select="thumbnail"/></xsl:attribute>
				<xsl:attribute name="id">imgDVD2<xsl:value-of select="position()"/></xsl:attribute>
			</img>
			<img>
				<xsl:attribute name="src">pictures/wall/hover-frame2.png</xsl:attribute>
				<xsl:attribute name="id">frmDVD2<xsl:value-of select="position()"/></xsl:attribute>
			</img>
</xsl:for-each>
  </xsl:when>
    <xsl:when test="$roundedcorners='list'">
  <xsl:for-each select="library/movies/movie">
			<img height="{$thumbnails.height}" width="{$thumbnails.width}">
				<xsl:attribute name="src"><xsl:value-of select="thumbnail"/></xsl:attribute>
				<xsl:attribute name="id">imglistDVD<xsl:value-of select="position()"/></xsl:attribute>
			</img>

						<xsl:choose>
							<xsl:when test="$videosource='true'">
								<xsl:call-template name="videoCodeclist" />
							</xsl:when>
							<xsl:when test="$videosource='false'">
								<xsl:call-template name="videoSourcelist" /><!-- id="vidlistDVD" -->
							</xsl:when>
							<xsl:when test="$videosource='primary'">
								<xsl:if test="videoCodec!='UNKNOWN'">
									<xsl:call-template name="videoCodeclist" />
								</xsl:if>
								<xsl:if test="videoCodec='UNKNOWN'">
									<xsl:call-template name="videoSourcelist" />
								</xsl:if>
							</xsl:when>
							<xsl:when test="$videosource='secondary'">
								<xsl:if test="videoSource!='UNKNOWN'">
									<xsl:call-template name="videoSourcelist" />
								</xsl:if>
								<xsl:if test="videoSource='UNKNOWN'">
									<xsl:call-template name="videoCodeclist" />
								</xsl:if>
							</xsl:when>
						</xsl:choose>
						<xsl:call-template name="studio" /><!-- id="stulistDVD" -->
</xsl:for-each>
			<img>
				<xsl:attribute name="src">pictures/wall/hover-frame-large.png</xsl:attribute>
				<xsl:attribute name="id">frmlistDVD</xsl:attribute>
			</img>
  </xsl:when>
  	</xsl:choose>
	
</xsl:otherwise></xsl:choose>
  
  <div class="title">
<a><xsl:attribute name="href">Categories.html</xsl:attribute><xsl:attribute name="TVID"><xsl:value-of select="$category"/></xsl:attribute></a>
<a><xsl:attribute name="href">Other_TV Shows_1.html</xsl:attribute><xsl:attribute name="TVID"><xsl:value-of select="$TVLink"/></xsl:attribute></a>
<a><xsl:attribute name="href"><xsl:value-of select="$MoviesURL"/></xsl:attribute><xsl:attribute name="TVID"><xsl:value-of select="$MoviesLink"/></xsl:attribute></a>
	<xsl:if test="$currentIndexPage != $currentHomePage"><a><xsl:attribute name="TVID">HOME</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$homePage"/></xsl:attribute></a></xsl:if>
	<xsl:if test="$currentIndexPage = $currentHomePage"> <a><xsl:attribute name="TVID">HOME</xsl:attribute> <xsl:attribute name="href"><xsl:value-of select="$custom5150.exitviamenu"/></xsl:attribute></a></xsl:if>
<!--    <a TVID="HOME"><xsl:attribute name="href"><xsl:value-of select="$homePage"/></xsl:attribute></a>-->
<!--    <a TVID="TAB"><xsl:attribute name="href">../../../</xsl:attribute></a>-->
<!--    <a TVID="PGDN" name="pgdnload" onfocusload=""><xsl:attribute name="href"><xsl:value-of select="//index[@current='true']/@next" />.html</xsl:attribute></a>
    <a TVID="PGUP" name="pgupload" onfocusload=""><xsl:attribute name="href"><xsl:value-of select="//index[@current='true']/@previous" />.html</xsl:attribute></a>-->
    <a TVID="PGDN" name="pgdnload" onfocusload=""><xsl:attribute name="href"><xsl:value-of select="library/category[@current='true']/index[@current='true']/@next" />.html</xsl:attribute></a>
    <a TVID="PGUP" name="pgupload" onfocusload=""><xsl:attribute name="href"><xsl:value-of select="library/category[@current='true']/index[@current='true']/@previous" />.html</xsl:attribute></a>
  </div>


<xsl:if test="$WallRedURL != ''"><a><xsl:attribute name="TVID">RED</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$WallRedURL" /></xsl:attribute></a></xsl:if>
<xsl:if test="$WallGreenURL != ''"><a><xsl:attribute name="TVID">GREEN</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$WallGreenURL" /></xsl:attribute></a></xsl:if>
<xsl:if test="$WallYellowURL != ''"><a><xsl:attribute name="TVID">YELLOW</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$WallYellowURL" /></xsl:attribute></a></xsl:if>
<xsl:if test="$WallBlueURL != ''"><a><xsl:attribute name="TVID">BLUE</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$WallBlueURL" /></xsl:attribute></a></xsl:if>
<xsl:if test="$WallPlay != ''"><a><xsl:attribute name="TVID">PLAY</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$WallPlay" /></xsl:attribute></a></xsl:if>
<xsl:if test="$WallMenu != ''"><a><xsl:attribute name="TVID">TAB</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$WallMenu" /></xsl:attribute></a></xsl:if>
<xsl:if test="$Angle != ''"><a><xsl:attribute name="TVID">COPY</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$Angle" /></xsl:attribute></a></xsl:if>
<xsl:if test="$Stop != ''"><a><xsl:attribute name="TVID">ESC</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$Stop" /></xsl:attribute></a></xsl:if>
<xsl:if test="$Repeat != ''"><a><xsl:attribute name="TVID">REPEAT</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$Repeat" /></xsl:attribute></a></xsl:if>
<xsl:if test="$Source != ''"><a><xsl:attribute name="TVID">USR</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$Source" /></xsl:attribute></a></xsl:if>
<xsl:if test="$Setup != ''"><a><xsl:attribute name="TVID">SETUP</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$Setup" /></xsl:attribute></a></xsl:if>
<xsl:if test="$Delete != ''"><a><xsl:attribute name="TVID">CLEAR</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$Delete" /></xsl:attribute></a></xsl:if>
<xsl:if test="$Title != ''"><a><xsl:attribute name="TVID">URL</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$Title" /></xsl:attribute></a></xsl:if>
<xsl:if test="$Info != ''"><a><xsl:attribute name="TVID">INFO</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="$Info" /></xsl:attribute></a></xsl:if>

</body>
</html>
</xsl:template>

<xsl:template match="movie">
  <xsl:param name="gap" />
  <xsl:param name="currentIndex" />
  <xsl:param name="lastIndex" />
  <xsl:param name="lastGap" />
  
  						<xsl:choose>
							<xsl:when test="$roundedcorners='true' or $roundedcorners='box'">
								
     <td align="center">
	 			<xsl:attribute name="background">
				<xsl:value-of select="thumbnail"/>
			</xsl:attribute>
        <a>
			<xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
			<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
			<xsl:attribute name="TVID"><xsl:value-of select="position()+$gap"/></xsl:attribute>
          <xsl:attribute name="name"><xsl:value-of select="position()+$gap"/></xsl:attribute>
			<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
          <xsl:if test="$lastIndex != 0">
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='true'">
              <xsl:attribute name="onkeyupset">left</xsl:attribute>
            </xsl:if>
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='false' and $NavBar='false'">
              <xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
            </xsl:if>
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='false' and $NavBar='true'">
              <xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
            </xsl:if>
			
		<xsl:if test="position()+$gap = 1">
          <xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
        </xsl:if>
					   
					   <xsl:choose>
                        <xsl:when test="$mjb.nbThumbnailsPerPage = 27">
								<xsl:if test="position()+$gap = 9">
								  <xsl:attribute name="onkeyrightset">10</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 10">
								  <xsl:attribute name="onkeyleftset">9</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 18">
								  <xsl:attribute name="onkeyrightset">19</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 19">
								  <xsl:attribute name="onkeyleftset">18</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 27">
								  <xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute>
								</xsl:if>
						</xsl:when>
                        <xsl:when test="$mjb.nbThumbnailsPerPage = 12">
								<xsl:if test="position()+$gap = 6">
								  <xsl:attribute name="onkeyrightset">7</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 7">
								  <xsl:attribute name="onkeyleftset">6</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 12">
								  <xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute>
								</xsl:if>
						</xsl:when>
                       </xsl:choose>

            <xsl:if test="$gap=$lastGap and $currentIndex != $lastIndex">
              <xsl:attribute name="onkeydownset">pgdnload</xsl:attribute>
            </xsl:if>
          </xsl:if>
          <img width="{$thumbnails.width}" height="{$thumbnails.height}">
		<xsl:choose>
			<xsl:when test="$SetFanart='true' and contains(//index[@current='true']/@next,'Set_')">
				<xsl:attribute name="src">pictures/1x1.png</xsl:attribute>
			</xsl:when>
			<xsl:otherwise>
			<xsl:if test="$roundedcorners='true'">
				<xsl:attribute name="src">pictures/wall/posteroverlay.png</xsl:attribute>
			</xsl:if>			
			<xsl:if test="$roundedcorners='box'">
				<xsl:if test="season='-1'">
					<xsl:choose>
						<xsl:when test="contains(videoSource,'BluRay')"><xsl:attribute name="src">pictures/boxes/thumb_bluray.png</xsl:attribute></xsl:when>
						<xsl:when test="contains(videoSource,'D-THEATER')"><xsl:attribute name="src">pictures/boxes/thumb_dtheater.png</xsl:attribute></xsl:when>
						<xsl:when test="contains(videoSource,'HDDVD')"><xsl:attribute name="src">pictures/boxes/thumb_hddvd.png</xsl:attribute></xsl:when>
						<xsl:when test="contains(videoSource,'DVD')"><xsl:attribute name="src">pictures/boxes/thumb_dvd.png</xsl:attribute></xsl:when>
						<xsl:when test="contains(videoSource,'HDTV')"><xsl:attribute name="src">pictures/boxes/thumb_hdtv.png</xsl:attribute></xsl:when>
						<xsl:otherwise><xsl:attribute name="src">pictures/boxes/thumb_generic.png</xsl:attribute></xsl:otherwise>
					</xsl:choose>
				</xsl:if>
				<xsl:if test="season!='-1'"><xsl:attribute name="src">pictures/boxes/thumb_tv.png</xsl:attribute></xsl:if>
			</xsl:if>
			</xsl:otherwise>
		</xsl:choose>
			<xsl:attribute name="onfocussrc">pictures/wall/glassoverlay5.png</xsl:attribute>
          </img>
        </a>		
     </td>
								
							</xsl:when>
							<xsl:when test="$roundedcorners='false'">

     <td align="center">
        <a>
          <xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
			<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
          <xsl:attribute name="TVID"><xsl:value-of select="position()+$gap"/></xsl:attribute>
          <xsl:attribute name="name"><xsl:value-of select="position()+$gap"/></xsl:attribute>
			<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
          <xsl:if test="$lastIndex != 0">
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='true'">
              <xsl:attribute name="onkeyupset">left</xsl:attribute>
            </xsl:if>
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='false' and $NavBar='false'">
              <xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
            </xsl:if>
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='false' and $NavBar='true'">
              <xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
            </xsl:if>
			
		<xsl:if test="position()+$gap = 1">
          <xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
        </xsl:if>
 					   
					   <xsl:choose>
                        <xsl:when test="$mjb.nbThumbnailsPerPage = 27">
								<xsl:if test="position()+$gap = 9">
								  <xsl:attribute name="onkeyrightset">10</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 10">
								  <xsl:attribute name="onkeyleftset">9</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 18">
								  <xsl:attribute name="onkeyrightset">19</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 19">
								  <xsl:attribute name="onkeyleftset">18</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 27">
								  <xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute>
								</xsl:if>
						</xsl:when>
                        <xsl:when test="$mjb.nbThumbnailsPerPage = 12">
								<xsl:if test="position()+$gap = 6">
								  <xsl:attribute name="onkeyrightset">7</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 7">
								  <xsl:attribute name="onkeyleftset">6</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 12">
								  <xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute>
								</xsl:if>
						</xsl:when>
                       </xsl:choose>

            <xsl:if test="$gap=$lastGap and $currentIndex != $lastIndex">
              <xsl:attribute name="onkeydownset">pgdnload</xsl:attribute>
            </xsl:if>
          </xsl:if>
<!--		  <xsl:choose><xsl:when test="contains(//index[@current='true']/@next,'_1') and $resize='true' and count(library/movies/movie)=8">
          <img width="132" height="196">
		    <xsl:attribute name="src"><xsl:value-of select="thumbnail"/></xsl:attribute>
            <xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+$gap"/>)</xsl:attribute>
            <xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+$gap"/>)</xsl:attribute>
			<xsl:attribute name="onfocussrc">pictures/wall/glassoverlay5.png</xsl:attribute>
          </img>
		  </xsl:when><xsl:otherwise>-->
          <img width="{$thumbnails.width}" height="{$thumbnails.height}">
		    <xsl:attribute name="src"><xsl:value-of select="thumbnail"/></xsl:attribute>
			<xsl:attribute name="onfocussrc">pictures/wall/glassoverlay5.png</xsl:attribute>
          </img>
<!--		  </xsl:otherwise></xsl:choose>-->
        </a>
     </td>
							
							</xsl:when>
							<xsl:when test="$roundedcorners='awesome'">

     <td align="center">
        <a>
          <xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
		  <xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
          <xsl:attribute name="TVID"><xsl:value-of select="position()+$gap"/></xsl:attribute>
          <xsl:attribute name="name"><xsl:value-of select="position()+$gap"/></xsl:attribute>
			<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
          <xsl:if test="$lastIndex != 0">
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='true'">
              <xsl:attribute name="onkeyupset">left</xsl:attribute>
            </xsl:if>
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='false' and $NavBar='false'">
              <xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
            </xsl:if>
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='false' and $NavBar='true'">
              <xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
            </xsl:if>
			
		<xsl:if test="position()+$gap = 1">
          <xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
        </xsl:if>
					   
								<xsl:if test="position()+$gap = 9">
								  <xsl:attribute name="onkeyrightset">10</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 10">
								  <xsl:attribute name="onkeyleftset">9</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 18">
								  <xsl:attribute name="onkeyrightset">19</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 19">
								  <xsl:attribute name="onkeyleftset">18</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 27">
								  <xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute>
								</xsl:if>

            <xsl:if test="$gap=$lastGap and $currentIndex != $lastIndex">
              <xsl:attribute name="onkeydownset">pgdnload</xsl:attribute>
            </xsl:if>
          </xsl:if>
          <img width="117" height="174">
            <xsl:attribute name="src"><xsl:value-of select="thumbnail"/></xsl:attribute>
			<xsl:attribute name="onfocussrc">pictures/wall/transparent.png</xsl:attribute>
          </img>
        </a>
		
     </td>
							
							</xsl:when>
							
							<xsl:when test="$roundedcorners='awesome2'">

     <td align="center">
        <a>
          <xsl:attribute name="href"><xsl:value-of select="details"/></xsl:attribute>
			<xsl:attribute name="onclick">return prompter('<xsl:value-of select="certification"/>')</xsl:attribute>
          <xsl:attribute name="TVID"><xsl:value-of select="position()+$gap"/></xsl:attribute>
          <xsl:attribute name="name"><xsl:value-of select="position()+$gap"/></xsl:attribute>
			<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onfocus">show(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
			<xsl:attribute name="onblur">hide(<xsl:value-of select="position()+$gap"/>, '<xsl:call-template name="search-and-replace"><xsl:with-param name="input" select="baseFilename"/><xsl:with-param name="search-string">'</xsl:with-param><xsl:with-param name="replace-string">\'</xsl:with-param></xsl:call-template>.playlist.jsp')</xsl:attribute>
          <xsl:if test="$lastIndex != 0">
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='true'">
              <xsl:attribute name="onkeyupset">left</xsl:attribute>
            </xsl:if>
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='false' and $NavBar='false'">
              <xsl:attribute name="onkeyupset">pgupload</xsl:attribute>
            </xsl:if>
            <xsl:if test="$gap=0 and $currentIndex != 0 and $FilterBar='false' and $NavBar='true'">
              <xsl:attribute name="onkeyupset">moviestv</xsl:attribute>
            </xsl:if>
			
		<xsl:if test="position()+$gap = 1">
          <xsl:attribute name="onkeyleftset">pgupload</xsl:attribute>
        </xsl:if>
					   
								<xsl:if test="position()+$gap = 6">
								  <xsl:attribute name="onkeyrightset">7</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 7">
								  <xsl:attribute name="onkeyleftset">6</xsl:attribute>
								</xsl:if>
								<xsl:if test="position()+$gap = 12">
								  <xsl:attribute name="onkeyrightset">pgdnload</xsl:attribute>
								</xsl:if>

            <xsl:if test="$gap=$lastGap and $currentIndex != $lastIndex">
              <xsl:attribute name="onkeydownset">pgdnload</xsl:attribute>
            </xsl:if>
          </xsl:if>
          <img width="176" height="261">
            <xsl:attribute name="src"><xsl:value-of select="thumbnail"/></xsl:attribute>
			<xsl:attribute name="onfocussrc">pictures/wall/transparent.png</xsl:attribute>
          </img>
        </a>
		
     </td>
							
							</xsl:when>
							
						</xsl:choose>
<!--
<xsl:choose>
	<xsl:when test="count(files/file/fileURL) > 1">
	<a>
		<xsl:choose>
			<xsl:when test="container = 'VOB' or substring(fileURL,string-length(fileURL)-3,4) = '.VOB' or substring(fileURL,string-length(fileURL)-3,4) = '.vob' or container = 'ISO' or substring(fileURL,string-length(fileURL)-3,4) = '.ISO' or substring(fileURL,string-length(fileURL)-3,4) = '.iso' or container = 'IMG' or substring(fileURL,string-length(fileURL)-3,4) = '.IMG' or substring(fileURL,string-length(fileURL)-3,4) = '.img' or container = 'MDF' or substring(fileURL,string-length(fileURL)-3,4) = '.MDF' or substring(fileURL,string-length(fileURL)-3,4) = '.mdf' or container = 'NRG' or substring(fileURL,string-length(fileURL)-3,4) = '.NRG' or substring(fileURL,string-length(fileURL)-3,4) = '.nrg' or container = 'BIN' or substring(fileURL,string-length(fileURL)-3,4) = '.BIN' or substring(fileURL,string-length(fileURL)-3,4) = '.bin' or container = 'DVD' or substring(fileURL,string-length(fileURL)-8,8) = 'VIDEO_TS' or substring(fileURL,string-length(fileURL)-8,8) = 'video_ts' or substring(fileURL, (string-length(fileURL) - string-length('/')) + 1) = '/'">
				<xsl:attribute name="href"><xsl:value-of select="files/file/fileURL"/></xsl:attribute>
				<xsl:attribute name="zcd">2</xsl:attribute>
				<xsl:attribute name="tvid">#</xsl:attribute>
				<xsl:attribute name="id">playid<xsl:value-of select="position()+$gap"/></xsl:attribute>
			</xsl:when>
			<xsl:when test="container = 'RAR' or substring(files/file/fileURL,string-length(files/file/fileURL)-3,4) = '.RAR' or substring(files/file/fileURL,string-length(files/file/fileURL)-3,4) = '.rar'">
				<xsl:attribute name="href"><xsl:value-of select="concat(files/file/fileURL,'?playall=1')" /></xsl:attribute>
				<xsl:attribute name="vod">playlist</xsl:attribute>
				<xsl:attribute name="tvid">#</xsl:attribute>
				<xsl:attribute name="id">playid<xsl:value-of select="position()+$gap"/></xsl:attribute>
			</xsl:when>
			<xsl:otherwise>
				<xsl:attribute name="href"><xsl:value-of select="baseFilename"/>.playlist.jsp</xsl:attribute>
				<xsl:attribute name="vod">playlist</xsl:attribute>
				<xsl:attribute name="tvid">#</xsl:attribute>
				<xsl:attribute name="id">playid<xsl:value-of select="position()+$gap"/></xsl:attribute>
			</xsl:otherwise>
		</xsl:choose>
	</a>
	</xsl:when>
	<xsl:otherwise>
	<a>
		<xsl:choose>
			<xsl:when test="container = 'VOB' or substring(fileURL,string-length(fileURL)-3,4) = '.VOB' or substring(fileURL,string-length(fileURL)-3,4) = '.vob' or container = 'ISO' or substring(fileURL,string-length(fileURL)-3,4) = '.ISO' or substring(fileURL,string-length(fileURL)-3,4) = '.iso' or container = 'IMG' or substring(fileURL,string-length(fileURL)-3,4) = '.IMG' or substring(fileURL,string-length(fileURL)-3,4) = '.img' or container = 'MDF' or substring(fileURL,string-length(fileURL)-3,4) = '.MDF' or substring(fileURL,string-length(fileURL)-3,4) = '.mdf' or container = 'NRG' or substring(fileURL,string-length(fileURL)-3,4) = '.NRG' or substring(fileURL,string-length(fileURL)-3,4) = '.nrg' or container = 'BIN' or substring(fileURL,string-length(fileURL)-3,4) = '.BIN' or substring(fileURL,string-length(fileURL)-3,4) = '.bin' or container = 'DVD' or substring(fileURL,string-length(fileURL)-8,8) = 'VIDEO_TS' or substring(fileURL,string-length(fileURL)-8,8) = 'video_ts' or substring(fileURL, (string-length(fileURL) - string-length('/')) + 1) = '/'">
				<xsl:attribute name="href"><xsl:value-of select="files/file/fileURL"/></xsl:attribute>
				<xsl:attribute name="zcd">2</xsl:attribute>
				<xsl:attribute name="tvid">#</xsl:attribute>
				<xsl:attribute name="id">playid<xsl:value-of select="position()+$gap"/></xsl:attribute>
			</xsl:when>
			<xsl:when test="container = 'RAR' or substring(files/file/fileURL,string-length(files/file/fileURL)-3,4) = '.RAR' or substring(files/file/fileURL,string-length(files/file/fileURL)-3,4) = '.rar'">
				<xsl:attribute name="href"><xsl:value-of select="concat(files/file/fileURL,'?playall=1')" /></xsl:attribute>
				<xsl:attribute name="vod">playlist</xsl:attribute>
				<xsl:attribute name="tvid">#</xsl:attribute>
				<xsl:attribute name="id">playid<xsl:value-of select="position()+$gap"/></xsl:attribute>
			</xsl:when>
			<xsl:otherwise>
				<xsl:attribute name="href"><xsl:value-of select="files/file/fileURL"/></xsl:attribute>
				<xsl:attribute name="vod"/>
				<xsl:attribute name="tvid">#</xsl:attribute>
				<xsl:attribute name="id">playid<xsl:value-of select="position()+$gap"/></xsl:attribute>
			</xsl:otherwise>
		</xsl:choose>
	</a>
	</xsl:otherwise>
</xsl:choose>
-->
</xsl:template>

<xsl:template name="search-and-replace">
	<xsl:param name="input" />
	<xsl:param name="search-string" />
	<xsl:param name="replace-string" />
	<xsl:choose>
		<xsl:when test="$search-string and contains($input, $search-string)">
			<xsl:value-of select="substring-before($input,$search-string)" />
			<xsl:value-of select="$replace-string" />
			<xsl:call-template name="search-and-replace">
				<xsl:with-param name="input" select="substring-after($input,$search-string)" />
				<xsl:with-param name="search-string" select="$search-string" />
				<xsl:with-param name="replace-string" select="$replace-string" />
			</xsl:call-template>
		</xsl:when>
		<xsl:otherwise><xsl:value-of select="$input" /></xsl:otherwise>
	</xsl:choose>
</xsl:template>

</xsl:stylesheet>
